note 107693 deleted from function.mysql-real-escape-string by danbrown

From: Date: Mon, 27 Feb 2012 15:49:23 +0000
Subject: note 107693 deleted from function.mysql-real-escape-string by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-186388@lists.php.net to get a copy of this message
Note Submitter: spam at douglasheld dot net ---- This is all completely approaching the security problem the wrong way. Escaping the input parameter to fit into SQL is a blacklisting approach that invites attackers to try new combinations, character encodings, missed assumptions etc, in order to accomplish a new SQL injection. A whitelisting approach is better; prepared statements are generally understood to be a whitelisting approach. You should all be using mysqli_prepare instead of all this. I do this for my day job.

« previous php.notes (#186388) next »