Reply to Re: _GET['name'] truncates

Your name:

Reply:


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
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация