Fix code typo
This commit is contained in:
@@ -32,7 +32,7 @@ If the user inputs a user name or password as:
|
||||
|
||||
Then our SQL becomes the following:
|
||||
|
||||
SELECT * FROM user WHERE username='myuser' or 'foo'=='foo' --'' AND password='xxx'
|
||||
SELECT * FROM user WHERE username='myuser' or 'foo' = 'foo' --'' AND password='xxx'
|
||||
|
||||
In SQL, anything after `--` is a comment. Thus, inserting the `--` as the attacker did above alters the query in a fatal way, allowing an attacker to successfully login as a user without a valid password.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user