Bug #9100 [Ana->Csd]: Error with nested boundaries where inner boundary is a subset of the outer
| From: | alan at akbkhome dot com | Date: | Thu, 02 Sep 2010 13:30:11 +0000 |
| Subject: | Bug #9100 [Ana->Csd]: Error with nested boundaries where inner boundary is a subset of the outer | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4745@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=9100&edit=1
ID: 9100
Updated by: alan@akbkhome.com
Reported By: rocca at start dot ca
Summary: Error with nested boundaries where inner boundary is
a subset of the outer
-Status: Analyzed
+Status: Closed
Type: Bug
Package: Mail_mimeDecode
Operating System: All
Package Version: 1.3.1
PHP Version: Irrelevant
-Assigned To:
+Assigned To: alan_k
Roadmap Versions:
New Comment:
-Status: Analyzed
+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.
Previous Comments:
------------------------------------------------------------------------
[2006-11-07 09:50:01] 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.
------------------------------------------------------------------------
[2006-10-20 00:31:53] rocca at start dot ca
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);
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=9100&edit=1