note 109514 added to function.escapeshellarg
| From: | sblyons+php at gmail dot com | Date: | Tue, 24 Jul 2012 14:38:39 +0000 |
| Subject: | note 109514 added to function.escapeshellarg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189387@lists.php.net to get a copy of this message | ||
Take care if using escapeshellarg() on serialized objects. Serialized objects contain null bytes,
and escapeshellarg stops on the first null byte so you will not receive the full argument. (I
consider this a bug, though not sure what it should do in this case. Probably serialize
shouldn't have used null bytes, but too late for that now).
The workaround I've found to pass serialized objects on the command line is to base64_encode()
them first and decode on the other side.
----
Server IP: 212.199.163.163
Probable Submitter: 95.35.46.7
----
Manual Page -- http://www.php.net/manual/en/function.escapeshellarg.php
Edit -- https://master.php.net/note/edit/109514
Del: integrated -- https://master.php.net/note/delete/109514/integrated
Del: useless -- https://master.php.net/note/delete/109514/useless
Del: bad code -- https://master.php.net/note/delete/109514/bad+code
Del: spam -- https://master.php.net/note/delete/109514/spam
Del: non-english -- https://master.php.net/note/delete/109514/non-english
Del: in docs -- https://master.php.net/note/delete/109514/in+docs
Del: other reasons-- https://master.php.net/note/delete/109514
Reject -- https://master.php.net/note/reject/109514
Search -- https://master.php.net/manage/user-notes.php