note 84789 added to function.escapeshellarg
| From: | Audun at osu1 dot php dot net | Date: | Wed, 30 Jul 2008 12:02:14 +0000 |
| Subject: | note 84789 added to function.escapeshellarg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142921@lists.php.net to get a copy of this message | ||
The reason why % are replaced with space on windows is that it is impossible in cmd.exe to escape or
quote them so that environment variables are not expanded. If for instance %path% is in your
argument it will always be expanded, so the only safe thing to do is to replace % with something
else.
Alternatively, you could wipe the environment before making the call to exec(), but that has its
side-effects.
----
Server IP: 128.39.198.38
Probable Submitter: 85.19.72.152
----
Manual Page -- http://www.php.net/manual/en/function.escapeshellarg.php
Edit -- https://master.php.net/note/edit/84789
Del: integrated -- https://master.php.net/note/delete/84789/integrated
Del: useless -- https://master.php.net/note/delete/84789/useless
Del: bad code -- https://master.php.net/note/delete/84789/bad+code
Del: spam -- https://master.php.net/note/delete/84789/spam
Del: non-english -- https://master.php.net/note/delete/84789/non-english
Del: in docs -- https://master.php.net/note/delete/84789/in+docs
Del: other reasons-- https://master.php.net/note/delete/84789
Reject -- https://master.php.net/note/reject/84789
Search -- https://master.php.net/manage/user-notes.php