#24805 [Fbk->Opn]: skip_long_header_sep routine break email

From: Date: Sat, 26 Jul 2003 10:31:56 +0000
Subject: #24805 [Fbk->Opn]: skip_long_header_sep routine break email
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-44787@lists.php.net to get a copy of this message
 ID:               24805
 User updated by:  bobe at phpcodeur dot net
 Reported By:      bobe at phpcodeur dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         Mail related
 Operating System: Linux
 PHP Version:      4.3.2
 New Comment:

The bug occurs for example with this code :

mail(
'test@domain.tld',
"=?iso-8859-1?Q?ceci_est_un_petit_test_pour_d=E9terminer_les_bugs_?=\r\n
=?iso-8859-1?Q?existants_avec_la_classe_mail?=",
'This is the message',
"From: my@domain.tld\nMIME-Version: 1.0"
);

result is : 
------------
 =?iso-8859-1?Q?existants_avec_la_classe_mail?=
From: my@domain.tld
MIME-Version: 1.0

This is the message.
------------

Maybe that the problem occurs with qmail because there are sequences
\r\n instead of \n in long subject ?


Previous Comments:
------------------------------------------------------------------------

[2003-07-25 17:46:55] iliaa@php.net

Where is the bug occuring imap, or something else? Who does the message
parsing?

------------------------------------------------------------------------

[2003-07-25 12:22:17] bobe at phpcodeur dot net

Sorry for the bad translation :/
note that quoted-printable encoding plays no role in the problem

------------------------------------------------------------------------

[2003-07-25 12:14:44] bobe at phpcodeur dot net

Description:
------------
Hello, 

The problem arises when we envoit an email with the subject encoded in
quoted-printable and of type "long header". 

skip_long_header_sep routine accept accepts only the separations
\r\n<LWS> but on some systems, it doubles the line feed in the header:


to test, send a long subject on a linux system

Reproduce code:
---------------
From - Fri Jul 25 18:53:24 2003
X-UIDL: 1059152088.14117.wsa-2037,S=4715
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <test@domain.tld>
Delivered-To: test2@domain.tld
Received: (qmail 14115 invoked by uid 99); 25 Jul 2003 16:54:48 -0000
To: Undisclosed-recipients: ;
Subject:
=?iso-8859-1?Q?ceci_est_un_petit_test_pour_d=E9terminer_les_bugs_?=

 =?iso-8859-1?Q?existants_avec_la_classe_mail?=
Date: Fri, 25 Jul 2003 18:54:48 +0200
From: "test" <test@domain.tld>
X-Env: Linux - Apache PHP/4.3.2
MIME-Version: 1.0
Message-ID: <h9VYpi7ADcC2VuPJHlFs3VJEE3jiyx@domain.tld>
Content-Type: multipart/mixed;
	boundary="-----=_Part0_6fEwBy2N74yqUJ0vNbQYrw0HBJrhLT--"

This is a multi-part message in MIME format.

Expected result:
----------------
simply that subject of mail correctly display

Actual result:
--------------
the headers undo the long sybject aren't interpreted


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24805&edit=1



Thread (17 messages)

« previous php.bugs (#44787) next »