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

Bug #7709 multipart/mixed with attachments are not decoded properly
Submitted: 2006-05-23 19:48 UTC
From: jthijssen at noxlogic dot nl Assigned: alan_k
Status: Closed Package: Mail_mimeDecode (version CVS)
PHP Version: 4.4.1 OS: Debian (3.1)
Roadmaps: 1.6.0    
Subscription  


 [2006-05-23 19:48 UTC] jthijssen at noxlogic dot nl (joshua thijssen)
Description: ------------ It looks like that the _boundaresplit() function splits the input on the boundaries, but the first and last part found is not returned (for $i = 1, $i < count ($tmp) -1; $i++)...) It should not rule out any parts returned by the split. A quick solution would be to modify the line to "for $i=1; $i<=count($tmp)-1; $i++). However, it will return the attachment but also returns a empty part which is found between "------=_NextPart_000_002C_8A6A229E.7935106B-- ------=_NextPart_000_002C_932E5A3C.95C782A3". Maybe a better solution would be to check if the last part contains text, if so, return that part, otherwise skip it. Test script: --------------- To: demo@example.org Subject: subject From: me <info@example.org> Sender: me <info@example.org> X-Mailer: NoxLogic/Automailer X-NoxVersion: 1.00.2. (running) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002C_932E5A3C.95C782A3" This is a multi-part message in MIME format. ------=_NextPart_000_002C_932E5A3C.95C782A3 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002C_8A6A229E.7935106B" ------=_NextPart_000_002C_8A6A229E.7935106B Content-Type: text/plain; charset='ISO-8859-1' Content-Transfer-Encoding: 7bit This is the text version of the email ------=_NextPart_000_002C_8A6A229E.7935106B Content-Type: text/html; charset='ISO-8859-1' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> This is the <strong>HTML</strong> <h1>Version</h1> of the email </body> </html> ------=_NextPart_000_002C_8A6A229E.7935106B-- ------=_NextPart_000_002C_932E5A3C.95C782A3 Content-Type: application/octet-stream; name="test.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.pdf" JVBEBOGUSBASE64DATARi0xBOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATAverO07JhripPlxrk5U6iSWSUa+L96wDX5UA1hmhnQSQusiHkyEMPWKkqviYOLhK6YsYjV21sB5bW/JVigMcjH+ebgW4HWQPRemIfuH0Gl+epxuosgHgs6h189wCfaDVgSd0+ii+Ann+mU2nCys7JaLFlWBwhYuzMo0ggWugJ7adwdPbwk0bvnxlFZSw8SU3ANzzjpTsWdBg5Uks5Kq0ZQEC/Esp7PRT38R7b+8b7JrFEpVPY+5mOZSOLS03fRb5su/0dNJSnfdy+DxCENppbrH5R5W+Su8fc8bKjeSJjoj98kEW4X7azGVmRbhuSyZLmPF1BbgXKxg9g8pr3XVpp8nDh4lVby/ZSqUs+1SKmsfhIDfpzC+Fxm3OUWmmvHig8wvJ5PyCrbm5qtPv23OQsTFIkASJApsqLwA5VD/N8D94fsn+ilK0okIkyG8p52pxWnNfCWronwhJuH/iSfJ/iFarCyMeHasL4mRUWSGJBrIAYmMG3GsVmbniSwGON7kkX4EcBx8lPD1B0zLhQ4uUGlWFFUXjPAqoXgRxq30zMepkcTm1SWZMPG37CO1FQ8xYZMURumjhxIHAdp+Sp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MTQ2NyAwMDAwMCBuIAowMDAwMDA1NDU5IDAwMDAwIG4gCjAwMDAwMDU2NTMgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxMQovUm9vdCAxMCAwIFIKL0luZm8gOSAwIFIKPj4Kc3RhcnR4cmVmCjU3NTIKJSVFT0YK Expected result: ---------------- To: demo@example.org Subject: subject From: me <info@example.org> Sender: me <info@example.org> X-Mailer: NoxLogic/Automailer X-NoxVersion: 1.00.2. (running) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002C_932E5A3C.95C782A3" This is a multi-part message in MIME format. ------=_NextPart_000_002C_932E5A3C.95C782A3 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002C_8A6A229E.7935106B" ------=_NextPart_000_002C_8A6A229E.7935106B Content-Type: text/plain; charset='ISO-8859-1' Content-Transfer-Encoding: 7bit This is the text version of the email stdClass Object ( [headers] => Array ( [to] => demo@example.org [subject] => subject [from] => me [sender] => me [x-mailer] => NoxLogic/Automailer [x-noxversion] => 1.00.2. (running) [mime-version] => 1.0 [content-type] => multipart/mixed; boundary="----=_NextPart_000_002C_932E5A3C.95C782A3" ) [ctype_primary] => multipart [ctype_secondary] => mixed [ctype_parameters] => Array ( [boundary] => ----=_NextPart_000_002C_932E5A3C.95C782A3 ) [parts] => Array ( [0] => stdClass Object ( [headers] => Array ( [content-type] => multipart/alternative; boundary="----=_NextPart_000_002C_8A6A229E.7935106B" ) [ctype_primary] => multipart [ctype_secondary] => alternative [ctype_parameters] => Array ( [boundary] => ----=_NextPart_000_002C_8A6A229E.7935106B ) [parts] => Array ( [0] => stdClass Object ( [headers] => Array ( [content-type] => text/plain; charset="ISO-8859-1" [content-transfer-encoding] => 7bit ) [ctype_primary] => text [ctype_secondary] => plain [ctype_parameters] => Array ( [charset] => ISO-8859-1 ) [body] => This is the text version of the email ) [1] => stdClass Object ( [headers] => Array ( [content-type] => text/html; charset="ISO-8859-1" ) [ctype_primary] => text [ctype_secondary] => html [ctype_parameters] => Array ( [charset] => ISO-8859-1 ) [body] => This is the HTML Version of the email ) ) ) [1] => stdClass Object ( [headers] => Array ( [content-type] => application/octet-stream; name="test.pdf" [content-transfer-encoding] => base64 [content-disposition] => attachment; filename="test.pdf" ) [ctype_primary] => application [ctype_secondary] => octet-stream [ctype_parameters] => Array ( [name] => test.pdf ) [disposition] => attachment [d_parameters] => Array ( [filename] => test.pdf ) [body] => JVBEBOGUSBASE64DATARi0xBOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATAverO07JhripPlxrk5U6iSWSUa+L96wDX5UA1hmhnQSQusiHkyEMPWKkqviYOLhK6YsYjV21sB5bW/JVigMcjH+ebgW4HWQPRemIfuH0Gl+epxuosgHgs6h189wCfaDVgSd0+ii+Ann+mU2nCys7JaLFlWBwhYuzMo0ggWugJ7adwdPbwk0bvnxlFZSw8SU3ANzzjpTsWdBg5Uks5Kq0ZQEC/Esp7PRT38R7b+8b7JrFEpVPY+5mOZSOLS03fRb5su/0dNJSnfdy+DxCENppbrH5R5W+Su8fc8bKjeSJjoj98kEW4X7azGVmRbhuSyZLmPF1BbgXKxg9g8pr3XVpp8nDh4lVby/ZSqUs+1SKmsfhIDfpzC+Fxm3OUWmmvHig8wvJ5PyCrbm5qtP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NzkgMDAwMDAgbiAKMDAwMDAwNTMyNiAwMDAwMCBuIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwODcgMDAwMDAgbiAKMDAwMDAwMTE2NiAwMDAwMCBuIAowMDAwMDAxMjYyIDAwMDAwIG4gCjAwMDAwMDEzNjMgMDAwMDAgbiAKMDAwMDAwMTQ2NyAwMDAwMCBuIAowMDAwMDA1NDU5IDAwMDAwIG4gCjAwMDAwMDU2NTMgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxMQovUm9vdCAxMCAwIFIKL0luZm8gOSAwIFIKPj4Kc3RhcnR4cmVmCjU3NTIKJSVFT0YK ) ) ) ------=_NextPart_000_002C_8A6A229E.7935106B Content-Type: text/html; charset='ISO-8859-1' <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> This is the <strong>HTML</strong> <h1>Version</h1> of the email </body> </html> ------=_NextPart_000_002C_8A6A229E.7935106B-- ------=_NextPart_000_002C_932E5A3C.95C782A3 Content-Type: application/octet-stream; name="test.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.pdf" JVBEBOGUSBASE64DATARi0xBOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOGUSBASE64DATABOG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DAgb2JqCjw8Ci9Qcm9kdWNlciAoRlBERiAxLjUyKQovVGl0bGUgKEVaU2hvcHBpbmcgT3JkZXIgI1dFQjAwMTEzMykKL1N1YmplY3QgKEVaU2hvcHBpbmcgT3JkZXIgI1dFQjAwMTEzMykKL0F1dGhvciAoTm94RW5naW5lKQovQ3JlYXRvciAoRVpTaG9wcGluZykKL0NyZWF0aW9uRGF0ZSAoRDoyMDA2MDMxNTEyMDk0MikKPj4KZW5kb2JqCjEwIDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAxIDAgUgovT3BlbkFjdGlvbiBbMyAwIFIgL0ZpdF0KL1BhZ2VMYXlvdXQgL1NpbmdsZVBhZ2UKPj4KZW5kb2JqCnhyZWYKMCAxMQowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDEwNzkgMDAwMDAgbiAKMDAwMDAwNTMyNiAwMDAwMCBuIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwODcgMDAwMDAgbiAKMDAwMDAwMTE2NiAwMDAwMCBuIAowMDAwMDAxMjYyIDAwMDAwIG4gCjAwMDAwMDEzNjMgMDAwMDAgbiAKMDAwMDAwMTQ2NyAwMDAwMCBuIAowMDAwMDA1NDU5IDAwMDAwIG4gCjAwMDAwMDU2NTMgMDAwMDAgbiAKdHJhaWxlcgo8PAovU2l6ZSAxMQovUm9vdCAxMCAwIFIKL0luZm8gOSAwIFIKPj4Kc3RhcnR4cmVmCjU3NTIKJSVFT0YK Actual result: -------------- stdClass Object ( [headers] => Array ( [to] => demo@example.org [subject] => subject [from] => me [sender] => me [x-mailer] => NoxLogic/Automailer [x-noxversion] => 1.00.2. (running) [mime-version] => 1.0 [content-type] => multipart/mixed; boundary="----=_NextPart_000_002C_932E5A3C.95C782A3" ) [ctype_primary] => multipart [ctype_secondary] => mixed [ctype_parameters] => Array ( [boundary] => ----=_NextPart_000_002C_932E5A3C.95C782A3 ) [parts] => Array ( [0] => stdClass Object ( [headers] => Array ( [content-type] => multipart/alternative; boundary="----=_NextPart_000_002C_8A6A229E.7935106B" ) [ctype_primary] => multipart [ctype_secondary] => alternative [ctype_parameters] => Array ( [boundary] => ----=_NextPart_000_002C_8A6A229E.7935106B ) [parts] => Array ( [0] => stdClass Object ( [headers] => Array ( [content-type] => text/plain; charset="ISO-8859-1" [content-transfer-encoding] => 7bit ) [ctype_primary] => text [ctype_secondary] => plain [ctype_parameters] => Array ( [charset] => ISO-8859-1 ) [body] => This is the text version of the email ) [1] => stdClass Object ( [headers] => Array ( [content-type] => text/html; charset="ISO-8859-1" ) [ctype_primary] => text [ctype_secondary] => html [ctype_parameters] => Array ( [charset] => ISO-8859-1 ) [body] => This is the HTML Version of the email ) ) ) ) )

Comments

 [2010-09-02 17:04 UTC] alan_k (Alan Knowles)
-Status: Open +Status: Closed -Assigned To: +Assigned To: alan_k
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.