From 5ffe5a7e8a9808adfba9071859ad0b37f2ebffbf Mon Sep 17 00:00:00 2001 From: fidian Date: Sun, 1 Oct 2000 16:32:46 +0000 Subject: [PATCH] Strings with ) are not counted in mime_match_parenthesis() git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@770 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions/mime.php b/functions/mime.php index c837fd8d..a3556f0d 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -337,11 +337,19 @@ $char = substr($structure, $pos, 1); // ignore all extra characters + // If inside of a string, skip string -- Boundary IDs and other + // things can have ) in them. while ($pos < strlen($structure)) { $pos++; $char = substr($structure, $pos, 1); if ($char == ")") { return $pos; + } else if ($char == '"') { + $pos ++; + while (substr($structure, $pos, 1) != '"' && + $pos < strlen($structure)) { + $pos ++; + } } else if ($char == "(") { $pos = mime_match_parenthesis ($pos, $structure); } -- 2.25.1