Jump to content

[SOLVED] SQL Injection Help


jjacquay712

Recommended Posts

say that you are having a user log in.  If you said SELECT usersname, password FROM users WHERE username = $POST_['whatever']

 

Well, if the user enters in-

myname 'OR 1 =1'

 

your query will return all of the users in your database.  Why?  Because 1 is equal to 1.  At that point it isn't looking for anything to match in the database, just a true condition, which is was given.

 

Now that the true condition is found, it doesn't filter out any specific results, but will return them all.  This can be a problem, obviously.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.