note 69930 added to function.exec
| From: | sirnuke at gmail dot com | Date: | Wed, 27 Sep 2006 05:26:48 +0000 |
| Subject: | note 69930 added to function.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117706@lists.php.net to get a copy of this message | ||
Note that on Linux/UNIX/etc, both the command and any parameters you send is visible to anyone with
access to ps.
For example, take some php code that calls an external program, and sends a sort of password as a
parameter.
<?php
exec("/usr/bin/secureprogram password");
?>
The entire string (actually probably something like "secureprogram password") will be
visible to any user that executes ps -A -F. If you are going to be doing a lot of external calling,
or any of it needs to be somewhat secure, you are probably better off writing a php extension.
----
Server IP: 66.207.199.35
Probable Submitter: 141.213.221.165
----
Manual Page -- http://www.php.net/manual/en/function.exec.php
Edit -- https://master.php.net/note/edit/69930
Del: integrated -- https://master.php.net/note/delete/69930/integrated
Del: useless -- https://master.php.net/note/delete/69930/useless
Del: bad code -- https://master.php.net/note/delete/69930/bad+code
Del: spam -- https://master.php.net/note/delete/69930/spam
Del: non-english -- https://master.php.net/note/delete/69930/non-english
Del: in docs -- https://master.php.net/note/delete/69930/in+docs
Del: other reasons-- https://master.php.net/note/delete/69930
Reject -- https://master.php.net/note/reject/69930
Search -- https://master.php.net/manage/user-notes.php