Re: [PHP] exec() confused by a specially crafted string

2009-10-12 Thread Soner Tari
On Mon, 2009-10-12 at 13:21 -0300, Jonathan Tapicer wrote: > Confirmed, it also happens to me on Linux, PHP version: > > PHP 5.2.4-2ubuntu5.7 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 21 > 2009 19:52:39) > Copyright (c) 1997-2007 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend

[PHP] exec() confused by a specially crafted string

2009-10-12 Thread Soner Tari
When shell command returns a specially crafted string, I get an empty array as $output of exec(), instead of the string. I can very easily reproduce this issue as follows: Put the following lines in bug.php: Then put the following in echostr.php (the string is just one line actually, new lines