Thread: Check my code
View Single Post
Old 10-04-2007, 08:26 PM   #6 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by Haris View Post
Thanks and I thought sprintf was only used for user submitted data?
$szUser is submitted data ($szUser = $_POST['user'];). Just because you're using a SELECT here doesn't mean that a nasty user couldn't inject other code to UPDATE/DELETE/whatever.

From looking at your original post, it doesn't look like you're escaping any of the POSTed data. The validation class might help a bit (I don't know, we can't see what it does) but you should always, always use the escaping functions for all input data.
Salathe is offline  
Reply With Quote