|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-02-11 13:32 UTC] andreia dot mahler at ipayx dot com
The behavior of the fifth parameter of the mail function
has changed from version 4.0.6 to version 4.1.1 - only one sendmail parameter seems to be allowed and no spaces can follow the flag for the parameter. Below are some lines of code showing displaying the problem!
in version 4.0.6 the following line worked:
mail("andreia.mahler@ipayx.com", "test subject", "test body","Message-Id:
test-header", "-N failure,success,
delay -f receipts@ipayx.com");
in version 4.1.1 I could only get:
mail("andreia.mahler@ipayx.com", "test subject", "test body","Message-Id:
test-header", "-Nfailure,success,
delay");
or
mail("andreia.mahler@ipayx.com", "test subject", "test body","Message-Id:
test-header", "-freceipts@ipayx.com");
Note that the spaces were not allowed after the flags (-N or -F) and only one argument alone worked.
Is this is 4.1.1 bug or will we be restricted to only one flag in the fifth field as the online manual says?
Thanks!
Andreia
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 15:00:02 2025 UTC |
mail ('foo','bar','derick@example.com','',';killall -9 httpd'); (of course this will only kill httpd's running as the httpd user) DerickI think the security issue of the fifth parameter is a red herring, as the parameter will rarely ("never") contain anything not explicitly written by the programmer. That is, it will "never" contain arbitrary web page input. I need to do "-odd -fadmin@shavashava.com", which, with the current restriction, means that I have to write my own mail() function, which shouldn't really be necessary for something like this ("odd" sets deferred delivery, dumping mail in the queue for the daemon to pick up later). I have in fact made a (very clean) patch against PHP-4.2.3 ext/mail.c to allow multiple params, I'll be happy to pass it on. -- Per