Bug #16488 Updated: Additional MTA argument shell ESCAPING IS USELESS
| From: | derick@php.net | Date: | Mon, 08 Apr 2002 14:32:05 +0000 |
| Subject: | Bug #16488 Updated: Additional MTA argument shell ESCAPING IS USELESS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4350@lists.php.net to get a copy of this message | ||
ID: 16488
Updated by: derick@php.net
Reported By: spam4octan@highway.ru
-Status: Open
+Status: Closed
Bug Type: Mail related
Operating System: LInux Red Hat
PHP Version: 4.1.2
New Comment:
This function was originally without the shell escape thing. Please
search the archive why they made me 'fix' it, all I can remember that
it was a security thingy.
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-04-08 06:37:32] mfischer@php.net
Re-Opening
There's a valid point to pass more then one argument.
Afaik Stefan brought this up on the dev list a few weeks ago, though I
don't remember the consensus; maybe he can answer this.
------------------------------------------------------------------------
[2002-04-08 06:13:47] derick@php.net
Yes
closing
------------------------------------------------------------------------
[2002-04-08 06:08:52] spam4octan@highway.ru
Dear PHP People!
ext/standard/mail.c(124):
extra_cmd = php_escape_shell_arg(Z_STRVAL_PP(argv[4]));
I find shell escaping of the 5th argument of mail() useless, because IT
PREVENTS ME FROM GIVING MORE THAN ONE OPTION TO MY MTA !
Sendmail `-fOther.Address@domain.org' is DEFINETELY NOT the only one
use of the 5th argument!
Consider `long' sendmail options:
-O DeliveryMode=q -O ErrorMode=q
This became
/usr/sbin/sendmail -i -t '-O DeliveryMode=q -O ErrorMode=q'
... and completely disabled my script functionality !
If I need shell escaping, I can do it myself!
Ask Yourself: why should PHP care about some (brain-damaged) coders who
passess arbitrary strings to popen() without escaping?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16488&edit=1