note 63179 added to function.escapeshellcmd
| From: | ceejay at trashfactory dot de | Date: | Wed, 15 Mar 2006 12:43:26 +0000 |
| Subject: | note 63179 added to function.escapeshellcmd | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-105856@lists.php.net to get a copy of this message | ||
Well guys, i find it very hard that escapeshellarg and escapeshellcmd are forcely run when passing a
command to exec, system or popen, when safe_mode is turned on.
Right now, i did not find any working solution to pass commands like this:
cmd -arg1 -arg2 "<BLA varname=\"varvalue\" varname1=\"varvalue1\"
/>"
it is just the case, that the parameter for arg2 which is a string that looks like an HTML-Tag with
various attributes set, all attributes of the string in arg2 gets splitted by the whitespaces
within. this wont happen with safe_mode turned off, so it must be one of the escapefunctions, that
breaks functionality.
In order to circumvent this, i have made a temporary solution, which dynamically creates a
skriptfile (by fopen), which just contains the whole command with arguments, and then execute that
skriptfile. i dont like that solution, but in the other hand, safe_mode cannot be easily turned off
on that server.
----
Server IP: 217.160.72.57
Probable Submitter: 85.178.174.254
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.escapeshellcmd.php
Edit -- http://master.php.net/note/edit/63179
Del: integrated -- http://master.php.net/note/delete/63179/integrated
Del: useless -- http://master.php.net/note/delete/63179/useless
Del: bad code -- http://master.php.net/note/delete/63179/bad+code
Del: spam -- http://master.php.net/note/delete/63179/spam
Del: non-english -- http://master.php.net/note/delete/63179/non-english
Del: in docs -- http://master.php.net/note/delete/63179/in+docs
Del: other reasons-- http://master.php.net/note/delete/63179
Reject -- http://master.php.net/note/reject/63179
Search -- http://master.php.net/manage/user-notes.php