php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24400 CRLFCRLF in the "header" parameter is being converted to CRLF
Submitted: 2003-06-30 03:26 UTC Modified: 2003-07-29 03:36 UTC
From: vitali_e at mail dot ru Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.3.2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vitali_e at mail dot ru
New email:
PHP Version: OS:

 

 [2003-06-30 03:26 UTC] vitali_e at mail dot ru
Description:
------------
Our old API is using "mail" function to send e-mails. When it needs to attach files, it creates the mail body and specifies it as a "header" parameter for the "mail" function. With PHP 4.3.2 on Windows XP mail send stopped working. The mail received had all of the "CRLFCRLF" ("\r\n\r\n") strings converted to CRLF ("\r\n"), in other words some kind of header parsing was done by mail function."CRLFCRLF" is absolutely necessary for "message/rfc822" format. Maybe it looks a bit odd to use "mail" function for that, but BEFORE it was working for years, and NOW it doesn't. The "continuity of versions" law is broken.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 03:30 UTC] derick@php.net
Please show us a small code snippet that reproduces this. Changes might be that you're doing something wrong.
 [2003-07-07 02:41 UTC] sniper@php.net
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.


 [2003-07-07 04:01 UTC] vitali_e at mail dot ru
Problem disappeared with PHP4.3.3RC1.
 [2003-07-28 04:05 UTC] nagelfar at mail dot ru
Today I have downloaded PHP4.3.3RC1. Problem has not disappeared. My MailList module converts attachments in mail into BASE64. And problem is that the first 76-symbols line of the BASE64-encoded attachment is cut! Even CRLFCRLFCRLF is being converted into CRLF!
 [2003-07-29 02:53 UTC] pollita@php.net
The $header parameter is for headers.
The $message parameter is for the message (including multipart content).

Using mail() to put content in the $header parameter is not in accordance with its intended use.

By using a function incorrectly, you should not be surprised to find that it behaves unexpectedly.
 [2003-07-29 03:13 UTC] vitali_e at mail dot ru
Last comment disappoints me. I don't want to believe that PHP source code is a training base for boy-scouts."Continuity of versions" is not an empty sound. Dear pollita@php.net: If function was working for years, and then stops working just because someone fixes it up to his understanding of it, forgetting that there are tonns of code in the world using that function, then it must not be a PHP - Web Development Solution - but experimental solution for young C programmers.
Cheers
 [2003-07-29 03:36 UTC] wez@php.net
Regardless of how disappointed you may feel, you were misusing the API.

A number of changes have been and are being made to newer versions of the win32 mail command to protect against SMTP injection attacks and help prevent your scripts from being used as an open relay for spam.

If you are unhappy with the way that PHP is being developed, you can always:

o patch your local sources
o contribute a patch that is both safe and allows what you want to do.
o pay one of us to do it for you
o stop being so negative, hold your tongue and fix your script.


 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu May 19 19:04:05 2022 UTC