Home » Mail » Mail_mimeDecode » Bug #4585
Mail_MimeDecode: Mime boundary regex not taking simple quotes
Details
| Submitted | 2005-06-14 06:17 UTC |
|---|---|
| From | cyril at ecomposite dot fr |
| Assigned | alan_k |
| Status | Closed |
| Package | Mail_mimeDecode |
| PHP Version | 4.3.11 |
| OS | Irrelevant |
| Roadmaps | 1.6.0 |
Comments
[2005-06-14 06:17 UTC] cyril at ecomposite dot fr
Description:
------------
I have an email containing a simple quote as part of the
boundary. Here's an abstract:
Received: from smtpauth00.csee.siteprotect.com
([64.41.126.131] verified)
by mac.ecomposite.fr (CommuniGate Pro SMTP 4.2.4)
with ESMTP id 190010 for
cgodefroy.motdepasse@mobipict.com; Tue, 07 Jun 2005 11:31:48
+0200
Received: from [10.233.32.33] (unknown [213.223.195.4])
by smtpauth00.csee.siteprotect.com (Postfix) with ESMTP
id 2B4AA2BC018
for <cgodefroy.motdepasse@mobipict.com>; Tue, 7 Jun
2005 04:30:46 -0500 (CDT)
From: matthew@websan.net
Reply-To: matthew@websan.net
To: cgodefroy.motdepasse@mobipict.com
Subject:
Date: Tue, 7 Jun 2005 11:31:50 +0200
Message-ID: <4fvkKYQlf42G.lSqWYn24@smtp.websan.net>
X-Mailer: EPOC Email Version 2.10
MIME-Version: 1.0
Content-Language: i-default
Content-Type: multipart/mixed;
boundary="EPOC32-DJjQs,Tv1+-
mt6_9tZd'vjYGTpL7nKjkm0lM9Wh02x7MrM3j"
*This message was transferred with a trial version of
CommuniGate(tm) Pro*
This is a MIME Message
--EPOC32-DJjQs,Tv1+-mt6_9tZd'vjYGTpL7nKjkm0lM9Wh02x7MrM3j
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
--EPOC32-DJjQs,Tv1+-mt6_9tZd'vjYGTpL7nKjkm0lM9Wh02x7MrM3j
Content-Type: application/octet-stream
Content-Disposition: attachment;
filename="461M0022.jpg"
Content-Transfer-Encoding: base64
/9j/4QGsRXhpZgAASUkqAAgAAAAKAA4BAgAgAAAAhgAAAA8BAgAOAAAApgAA
ABABAgATAAAAtAAAABIBAwABAAAAAQAAABoBBQABAAAAyAAAABsBBQABAAAA
0AAAACgBAwABAAAAAgAAADIBAgAUAAAA2AAAABMCAwABAAAAAgAAAGmHBAAB
cSR1GR0JzSt1AR+EAZufpUA+U8N2qRm5B7H8qCcsVC9O2MVW2wthhJAA4x9K
aYycluDTvLOWZgcA4HFJjcMp261V7ahZob64BHtTQzBuOuOeD0pTkLls5z0z
Sct06+nWnoNIUnDEk5B6cUjHp1APpQW7E4GO9ISu0AEYJoQdRWAdSCduOc5F
RhfmwrZJpV2rn5uMYpUChsAnJ6EGnsJ6DG2nHpnk5oLHnOPYGnyMoJJ5z1wa
jwpzuOD9Ka13JaDd04HFM5Gcg9etPI3LxnnpjmmkY+YdPrTVgshuC2DwMHmm
tggjcSewFOkBZM5Az0xxTNmNrMwx35qg0P/Z
Reproduce code:
---------------
$params['include_bodies'] = true;
$params['decode_bodies'] = true;
$params['decode_headers'] = true;
$params['input'] = $input;
$structure = Mail_mimeDecode::decode($params);
Irrelevant he?
Expected result:
----------------
Without the simple quote in the boundary header, no error at
all, the decode works fine and I have all parts of the email
message.
Actual result:
--------------
I get 'No boundary found for ...' error message.
So I guess I should modify the regex in parseheadervalue()
unfortunately I cannot read or correct it: it is way too
complicated for me.
[2005-12-02 14:02 UTC] cm at data-consult dot de
look here please:
http://pear.php.net/bugs/5831
i think thats the same problem.
[2006-04-10 09:40 UTC] sebastian dot cristeanospam at bitnet dot info
Not same as 5831, the following should fix it:
Change line 454 in mimeDecode.php to:
$splitRegex = '/([^;\'"]*[\'"]([^"]*([^\'"]*)*)[\'"][^;\'"]*|([^;]+))(;|$)/';