note 64775 deleted from control-structures.foreach by nlopess

From: Date: Thu, 20 Apr 2006 16:24:39 +0000
Subject: note 64775 deleted from control-structures.foreach by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108825@lists.php.net to get a copy of this message
Note Submitter: alanc at squaresystems dot co dot uk ---- The snippet provided by vainternet.co.uk appears to me to be a very bad idea. My take on this is that your database is wide open to attack from users who've manipulated their request variables. In the snippet the variable $key is used to construct the SQL completely unvalidated by the code before it. For instance were I to add a text box to the form called id and enter a value of 999999 the result would be that I've updated the id of the record as well as the other fields! Additionally I suspect that this code suffers from the more usual SQL injection possibility documented many times elsewhere on this site.

« previous php.notes (#108825) next »