Re: Malicious SQL
| From: | Matt M. | Date: | Wed, 07 Jul 2004 16:10:37 +0000 |
| Subject: | Re: Malicious SQL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189880@lists.php.net to get a copy of this message | ||
> SELECT autoQuesID, fldQuesTitle, fldBody FROM tblFAQ_Question WHERE
> (blnHidden = FALSE AND ((fldBody LIKE '%$strCriteria%') OR (fldQuesTitle
> LIKE '%$strCriteria%')));
Say $strCriteria comes from one of the values in the $_REQUEST array,
a user change is coming through in that variable. so $strCriteria
could contain something like "%' OR fldBody = '' or fldBody LIKE '".
Things like this would not be very harmful in your select statement
but say it was a delete/update/insert statement and your $_REQUEST
variable was some kind of primary key. They could delete your whole
table, update your whole table, etc.
Just make sure that data you get in is what you expect.
here is a link that explains it better than I can
http://www.sitepoint.com/article/794?ct=1