note 120328 added to function.mail
| From: | Anonymous | Date: | Wed, 14 Dec 2016 10:18:04 +0000 |
| Subject: | note 120328 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-208585@lists.php.net to get a copy of this message | ||
Security advice: Although it is not documented, for the parameters $to and $subject the mail()
function changes at least \r and \n to space. So these parameters are safe against injection of
additional headers. But you might want to check $to for commas as these separate multiple addresses
and you might not want to send to more than one recipient.
The crucial part is the $additional_headers parameter. This parameter can't be cleaned by the
mail() function. So it is up to you to prevent unwanted \r or \n to be inserted into the values you
put in there. Otherwise you just created a potential spam distributor.
----
Server IP: 72.52.91.14
Probable Submitter: 80.147.208.173
----
Manual Page -- http://php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/120328
Del: integrated -- https://master.php.net/note/delete/120328/integrated
Del: useless -- https://master.php.net/note/delete/120328/useless
Del: bad code -- https://master.php.net/note/delete/120328/bad+code
Del: spam -- https://master.php.net/note/delete/120328/spam
Del: non-english -- https://master.php.net/note/delete/120328/non-english
Del: in docs -- https://master.php.net/note/delete/120328/in+docs
Del: other reasons-- https://master.php.net/note/delete/120328
Reject -- https://master.php.net/note/reject/120328
Search -- https://master.php.net/manage/user-notes.php