Re: Prevent execution bad commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ashley Sheridan a écrit :

find /home/test -mtime -$duration | sort | xargs grep -l "$search_criteria"

It's likely yes, unless you validate the search criteria in any way,
you're just asking for trouble.

  I just add an exemple that delete evérything on your server :

$searh_criteria = "`rm -rf /`" ;

It exists a function <http://fr2.php.net/manual/en/function.escapeshellcmd.php> that escape shuch kind of string.
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux