|
|
Posted by NC on 11/01/07 20:15
On Oct 31, 6:44 pm, gordonb.kw...@burditt.org (Gordon Burditt) wrote:
>
> > DELETE FROM the_table WHERE bar='%'
>
> > meaning, delete all records from the_table.
>
> No, that's not what it means.
>
> DELETE FROM the_table WHERE bar LIKE '%'
>
> means delete all records from the_table. The first query
> means delete all records where bar is of length one and
> contains a single percent sign.
You're right, of course. I just wanted a simple illustration, so I
misinterpreted the meaning of the SQL query to make a point. In the
real world, the attacker would use something like:
$_REQUEST['bar'] = "' OR bar LIKE '%"
Cheers,
NC
Navigation:
[Reply to this message]
|