php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50907 X-PHP-Originating-Script adding two new lines in *NIX
Submitted: 2010-02-02 10:14 UTC Modified: 2010-02-02 12:50 UTC
From: adeel dot e at gmail dot com Assigned:
Status: Closed Package: *Mail Related
PHP Version: 5.3.1 OS: CentOS 5.4
Private report: No CVE-ID: None
 [2010-02-02 10:14 UTC] adeel dot e at gmail dot com
Description:
------------
This change (http://cvs.php.net/viewvc.cgi/php-src/ext/standard/mail.c?
r1=1.106&r2=1.107) adds "\r\n" after the X-PHP-Originating-Script 
header, on *NIX machines using "\n" as new line separators, this results 
in *two* line breaks which breaks the email.

This worked fine in PHP 5.2.x but since upgrading to PHP 5.3 it has 
stopped working.

Expected result:
----------------
;-----------------
Date: 2 Feb 2010 01:41:56 +0000
To: [email protected]
Subject: My Subject
X-PHP-Originating-Script: 10002:mail.php
From: F <[email protected]>
Reply-To: F <[email protected]>
;-----------------

Actual result:
--------------
;-----------------
Date: 2 Feb 2010 01:41:56 +0000
To: [email protected]
Subject: My Subject
X-PHP-Originating-Script: 10002:mail.php

From: F <[email protected]>
Reply-To: F <[email protected]>
;-----------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-02 12:50 UTC] [email protected]
Automatic comment from SVN on behalf of iliaa
Revision: http://svn.php.net/viewvc/?view=revision&revision=294335
Log: Fixed bug #50907 (X-PHP-Originating-Script adding two new lines in *NIX).
 [2010-02-02 12:50 UTC] [email protected]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2010-02-05 00:19 UTC] [email protected]
Automatic comment from SVN on behalf of pajoye
Revision: http://svn.php.net/viewvc/?view=revision&revision=294548
Log: - Fixed bug #50907 (X-PHP-Originating-Script adding two new lines in *NIX).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jun 07 06:01:28 2025 UTC