#32600 [NEW]: PHP sets return-path incorrectly
From: freddie at vbulletin dot com
Operating system: Win32
PHP version: 5.0.4
PHP Bug Type: *Mail Related
Bug description: PHP sets return-path incorrectly
Description:
------------
A new bug has been introduced with the bug fix listed at
http://bugs.php.net/bug.php?id=28976
The above fix attempts to set a reverse-path based on the From: header if
sendmail_from is undefined.
The problem with this is that the From: header is taken verbatim and not
formatted to the RFC 2822 specification.
This results in the email being rejected by the server.
Reproduce code:
---------------
Example:
$headers .= "From: \"Example User\" <email@example.com>";
PHP will then set the RPath to "\"Example User\" <email@example.com>"
when it should be "<email@example.com>"
Expected result:
----------------
Line 440 win32/sendmail.c:
snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<email@example.com>\r\n",
RPath);
Actual result:
--------------
Line 440 win32/sendmail.c:
snprintf(Buffer, MAIL_BUFFER_SIZE, "MAIL FROM:<Example User
<email@example.com>>\r\n", RPath);
--
Edit bug report at http://bugs.php.net/?id=32600&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32600&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32600&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32600&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32600&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32600&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32600&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32600&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32600&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32600&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32600&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32600&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32600&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32600&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32600&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32600&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32600&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32600&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32600&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32600&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32600&r=mysqlcfg
Thread (3 messages)
- freddie at vbulletin dot com