note 55112 added to ref.mail
| From: | jfonseca at matarese dot com | Date: | Tue, 26 Jul 2005 01:42:02 +0000 |
| Subject: | note 55112 added to ref.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92438@lists.php.net to get a copy of this message | ||
Hi, from the example below :
$headers .= "From: \"".$fromname."\"
<".$fromaddress.">\n";
return mail($toaddress, $subject, $message, $headers);
This will allow a SMTP injection attack on your feedback form.
Make sure you end your headers with \r\n\r\n or the missing \r\n will allow the attacker to inject
additional headers.
The main use for this common flaw is to use your contact form for spam.
Remember: always triple-check user input that does anything meaningful.
----
Manual Page -- http://www.php.net/manual/en/ref.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55112
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55112&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55112&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55112&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55112&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55112&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55112&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55112&report=yes
Search -- http://master.php.net/manage/user-notes.php