Posted by Jerry Stuckle on 02/06/07 01:38
Toby A Inkster wrote:
> Jerry Stuckle wrote:
>
>> http://www.example.com?sql=delete%20from%20orders
>
> Given the sample code posted:
>
> <?php
> error_reporting(E_ALL);
> $query = $_GET['sql'];
> echo $query;
> ?>
>
> Your query would just print:
>
> delete from orders
>
> Which would not be insecure in the slightest -- after all, the script
> doesn't even open a database connection!
>
Don't be dense, Tony. This is obviously some debug code. In the real
code he would be opening the connection and executing the sql.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|