Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Bug #4585 Mail_MimeDecode: Mime boundary regex not taking simple quotes
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    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2010-09-02 16:34 UTC
Package:
Bug Type:
Summary:
From: cyril at ecomposite dot fr
New email:
PHP Version: Package Version: OS:

 

 [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.

Comments

 [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 (Sebastian Cristea)
Not same as 5831, the following should fix it: Change line 454 in mimeDecode.php to: $splitRegex = '/([^;\'"]*[\'"]([^"]*([^\'"]*)*)[\'"][^;\'"]*|([^;]+))(;|$)/';
 [2006-04-27 14:34 UTC] cipri (Cipriano Groenendal)
Moved to Mail_MimeDecode subpackage.
 [2007-02-12 21:10 UTC] cellog (Greg Beaver)
contains analysis of fix needed, changing to "Analyzed"
 [2007-02-12 21:14 UTC] cellog (Greg Beaver)
fix in #5831
 [2007-02-12 21:18 UTC] cellog (Greg Beaver)
also see #9344 for test script email
 [2007-12-11 13:22 UTC] pr1001 (Peter Robinett)
Sebastian Cristea's regex string works for this: Content-Type: multipart/mixed; boundary="EPOC32-yJ_w,dYvdWJSqRm'Z9nzbFty,yNP'Qv94z+Vyt-Bks80,+Dx" I believe the code should be updated to use his regex string.
 [2010-09-02 16:34 UTC] alan_k (Alan Knowles)
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: alan_k
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/