Aqua Posted March 24, 2008 Posted March 24, 2008 I think i found an area that could be exploited; The query would be; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The variables contains these data: $by = id ($_GET['by']) $ord = ASC/DESC ($_GET['ord']) $st = 0/100/200/etc.(increases on no of pages.) ($_GET['st']) The fix to this would be; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Magictallguy Posted March 24, 2008 Posted March 24, 2008 Re: Possible Exploit Fix v1 or v2? (For those that don't know (such as myself :P)) Quote
redsnake420 Posted March 25, 2008 Posted March 25, 2008 Re: Possible Exploit Fix lol when posting something like this legend killer try to say what file it is in :lol: Quote
Guest Anonymous Posted March 25, 2008 Posted March 25, 2008 Re: Possible Exploit Fix It's a good point though LK... Often people use $_GET or $_POST to directly create SQL statements ie. field names, sort order, direction and limits. Your solution demonstrates that any parameters coming in MUST be sanitized before use. Ideal for hall of fame / user lists where you may want to change the sort order or even what is displayed. Quote
Tonka Posted March 25, 2008 Posted March 25, 2008 Re: Possible Exploit Fix I tried that but i got, You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I have v2 btw Quote
Guest Anonymous Posted March 25, 2008 Posted March 25, 2008 Re: Possible Exploit Fix Well you would do - LIMIT ,100 should be LIMIT n,100 WHERE n is an integer defining the starting offset from where to fetch the data. The OP was merely suggesting a good method of ensuring that certain types of data passed from the user are thoroughly sanitized before being fed through to the database. Quote
Tonka Posted March 25, 2008 Posted March 25, 2008 Re: Possible Exploit Fix where would i put the "n"? Quote
Guest Anonymous Posted March 25, 2008 Posted March 25, 2008 Re: Possible Exploit Fix Exactly where it is -- http://dev.mysql.com/doc/refman/5.1/en/select.html Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.