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

Bug #9100 Error with nested boundaries where inner boundary is a subset of the outer
Submitted: 2006-10-20 04:31 UTC
From: rocca at start dot ca Assigned: alan_k
Status: Closed Package: Mail_mimeDecode (version 1.3.1)
PHP Version: Irrelevant OS: All
Roadmaps: 1.6.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 29 - 5 = ?

 
 [2006-10-20 04:31 UTC] rocca at start dot ca (Peter Rocca)
Description: ------------ If the input data has an inner boundary that contains a subset of the outer boundary the _boundarySplit function will incorrectly parse the data. For example: Content-Type: multipart/mixed; boundary="abc" --abc Content-Type: multipart/mixed; boundary="abc_a" --abc_a inner --abc_a-- outer --abc-- ...will return 'abc_a' as being at the same level as 'abc' and additionally create some garbage nodes. Test script: --------------- function _boundarySplit($input, $boundary) { - $tmp = explode('--' . $boundary, $input); + $tmp = preg_split("/--$boundary(\b|--)/", $input);

Comments

 [2006-11-07 14:50 UTC] rocca at start dot ca
Changing PHP/OS version to Irrelevant. Also the 'test script' is actually the diff required to fix the problem. Ie, using preg_split instead of explode.
 [2010-09-02 17:30 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!