ZF-3318: Zend_Mime_Decode::splitHeaderField() does not take leading whitespaces of header-values into account
Description
I receive this emails send via a newsletter-broker by a large german internet-provider-company frequently. One of their parts has the following signature:
------=_Part_1211565553483705f1279d64.44505779
Content-Type: multipart/alternative; boundary= "----=_Alternative_1211565553483705f1280701.15526894"
(Note the whitespace between "boundary=" and its value "----=_Alternative_1211565553483705f1280701.15526894")
When trying to parse for the message parts, the value of the boundary-property gets translated to (see Zend/Mime/Decode.php line 219)
"[whitespace]----=_Alternative_1211565553483705f1280701.15526894"
which causes the Zend_Mime_Decode::splitMime() to substitute this value to (see Zend/Mime/Decode.php line 54)
"--"[whitespace]----=_Alternative_1211565553483705f1280701.15526894""
resulting in not finding the related part for this boundary.
Suggested fix: use trim() before looking up quotes in header-values.
Comments
Posted by Dave Marshall (musher) on 2008-06-01T04:02:14.000+0000
Patch that fixes the code for this bug. partial test class
Posted by Wil Sinclair (wil) on 2008-06-09T11:07:17.000+0000
Please evaluate and fix/categorize as necessary.
Posted by old of Satoru Yoshida (yoshida@zend.co.jp) on 2008-11-06T21:36:43.000+0000
Solved in SVN r12352
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:18.000+0000
Changing issues in preparation for the 1.7.0 release.