[Bug 536631] New: PHP 5.3 - additional x-php-header can broken the mail header
http://bugzilla.novell.com/show_bug.cgi?id=536631 Summary: PHP 5.3 - additional x-php-header can broken the mail header Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Critical Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: freespacer@gmx.de QAContact: qa@suse.de Found By: --- Created an attachment (id=316691) --> (http://bugzilla.novell.com/attachment.cgi?id=316691) fix mail additional x-php-header User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.2) Gecko/20090730 SUSE/3.5.2-2.1 Firefox/3.5.2 OBS-URL: https://build.opensuse.org/package/show?package=php5&project=server%3Aphp If you set php.ini up the options "mail.add_x_header = On". URL: http://de3.php.net/manual/en/mail.configuration.php If you use the function mail(), PHP send an additional header. But the header is broken, because it send "\r\n" instead "\n". Some mail clients or other mail parser can't process the mailheaders, so the severity is critical. Workaround: turn off the "mail.add_x_header" in php.ini I add a patch for this problem in attachement. Reproducible: Always Steps to Reproduce: 1. set php.ini up to "mail.add_x_header = On" 2. create a php file like "mailtest.php" and modified it with your mailaddress: <?php $to = "your.email@address.de"; $subject = "This is a test"; $message = "This is a test\r\nWith more lines\r\nGreets from you script\r\n"; $headers = "From: \"Your Name\" <your.email@address.de>"; mail($to,$subject,$message,$headers); ?> 3. run the script mailtest.php Actual Results:
From - Thu Sep 3 19:53:42 2009 X-Account-Key: account3 X-UIDL: 130e071cdf90a2d19c41ea8fb616ee2f X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: Return-Path: <someuser@sebastian-siebert.com> X-Flags: 0000 Delivered-To: GMX delivery to freespacer@gmx.de Received: (qmail invoked by alias); 03 Sep 2009 17:53:34 -0000 Received: from sebastian-siebert.com (EHLO sebastian-siebert.com) [84.246.123.242] by mx0.gmx.net (mx017) with SMTP; 03 Sep 2009 19:53:34 +0200 Received: by sebastian-siebert.com (Postfix, from userid 0) id 97DC196C15A; Thu, 3 Sep 2009 19:54:19 +0200 (CEST) To: freespacer@gmx.de Subject: This is a test X-PHP-Originating-Script: 0:mailtest.php Date: Thu, 3 Sep 2009 19:53:34 +0200 Message-ID: <20090903175334.21822gmx1@mx017.gmx.net> X-GMX-Antivirus: 0 (no virus found) X-GMX-Antispam: 0 (Mail was not recognized as spam) X-GMX-UID: pjCTfhIsX1VpX2b7QmFy+7R3SDc4NMy+
From: "Sebastian Siebert" <freespacer@gmx.de> Message-Id: <20090903175419.97DC196C15A@sebastian-siebert.com> Date: Thu, 3 Sep 2009 19:54:19 +0200 (CEST) This is a test With more lines Greets from you script Expected Results:
From - Thu Sep 3 19:53:42 2009 X-Account-Key: account3 X-UIDL: 130e071cdf90a2d19c41ea8fb616ee2f X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: Return-Path: <someuser@sebastian-siebert.com> X-Flags: 0000 Delivered-To: GMX delivery to freespacer@gmx.de Received: (qmail invoked by alias); 03 Sep 2009 17:53:34 -0000 Received: from sebastian-siebert.com (EHLO sebastian-siebert.com) [84.246.123.242] by mx0.gmx.net (mx017) with SMTP; 03 Sep 2009 19:53:34 +0200 Received: by sebastian-siebert.com (Postfix, from userid 0) id 97DC196C15A; Thu, 3 Sep 2009 19:54:19 +0200 (CEST) To: freespacer@gmx.de Subject: This is a test X-PHP-Originating-Script: 0:mailtest.php Date: Thu, 3 Sep 2009 19:53:34 +0200 Message-ID: <20090903175334.21822gmx1@mx017.gmx.net> X-GMX-Antivirus: 0 (no virus found) X-GMX-Antispam: 0 (Mail was not recognized as spam) X-GMX-UID: pjCTfhIsX1VpX2b7QmFy+7R3SDc4NMy+ From: "Sebastian Siebert" <freespacer@gmx.de> Message-Id: <20090903175419.97DC196C15A@sebastian-siebert.com> Date: Thu, 3 Sep 2009 19:54:19 +0200 (CEST)
This is a test With more lines Greets from you script -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536631 Sebastian Siebert <freespacer@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |crrodriguez@novell.com |ovo.novell.com | -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536631 User crrodriguez@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=536631#c1 Cristian Rodríguez <crrodriguez@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Cristian Rodríguez <crrodriguez@novell.com> 2009-09-03 13:18:59 MDT --- fixed, will appear in the next rebuild(may take ages to publish) -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536631 User freespacer@gmx.de added comment http://bugzilla.novell.com/show_bug.cgi?id=536631#c2 Sebastian Siebert <freespacer@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | --- Comment #2 from Sebastian Siebert <freespacer@gmx.de> 2009-09-17 02:29:02 MDT --- The patch "php-5.3.0-bnc536631.patch" in OBS didn't solve really the problem. https://build.opensuse.org/package/view_file?file=php-5.3.0-bnc536631.patch&package=php5&project=server%3Aphp Please remove "\r" in line 10. Before: + spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\r\n%s", php_getuid(), f, headers); After: + spprintf(&hdr, 0, "X-PHP-Originating-Script: %ld:%s\n%s", php_getuid(), f, headers); -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536631 User crrodriguez@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=536631#c3 --- Comment #3 from Cristian Rodríguez <crrodriguez@novell.com> 2009-09-17 05:38:14 MDT --- That patch is not applied, simple because what you are reporting here is: http://bugs.php.net/bug.php?id=48620 and is already fixed in released php 5.3 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=536631 User crrodriguez@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=536631#c4 Cristian Rodríguez <crrodriguez@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |CLOSED Resolution| |UPSTREAM --- Comment #4 from Cristian Rodríguez <crrodriguez@novell.com> 2009-11-11 12:51:12 MST --- This issue is not openSUSE specific, and looks it is already fixed, if not, open a bug report at PHP.net -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com