|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22262 CRLF incorrectly converted to CRCRLF
Submitted: 2003-02-17 19:32 UTC Modified: 2003-02-25 02:07 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: adamness at yahoo dot com Assigned:
Status: No Feedback Package: Mail related
PHP Version: 4.3.0 OS: FreeBSD 4.3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-02-17 19:32 UTC] adamness at yahoo dot com
The RFC's require lines in the email header to end in "\r\n".  However, when using the mail function in PHP 4.3, and qmail-inject as the external mail program, the mail function was silently replacing my \n's with \r\n's, leaving me with "\r\r\n", which actually ends up violating the RFC, in a way that can cause buffer overflows in some mailreaders, and has been identified as a possible virus exploit by several virus scanners.

For a solution, the mail function, before replacing a \n with \r\n should check if the previous character is already a \r.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 11:36 UTC]
That seems to be a qmail issue to me, not a php one.

Did you try to send by qmail-inject some plain text every line of which ends with "\r\n" and confirm if the received mail is the right one?

 [2003-02-25 02:07 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 20:01:28 2024 UTC