From 377a40b2b1d2df34b77f5e35bf4493fd1c1ee748 Mon Sep 17 00:00:00 2001 From: fidian Date: Fri, 9 Feb 2001 16:12:54 +0000 Subject: [PATCH] * Noticed that mime_match_parentheses() didn't work when a string had quotes in it. The string (a " quote) returned by the IMAP server would look like "a \" quote", so needed to check for that. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1090 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/functions/mime.php b/functions/mime.php index 0731f7ba..4c1930b7 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -361,12 +361,18 @@ $pos ++; while (substr($structure, $pos, 1) != '"' && $pos < strlen($structure)) { + if (substr($structure, $pos, 2) == '\\"') + $pos ++; + elseif (substr($structure, $pos, 2) == '\\\\') + $pos ++; $pos ++; } } else if ($char == "(") { $pos = mime_match_parenthesis ($pos, $structure); } } + echo "Error decoding mime structure. Report this as a bug!
\n"; + return $pos; } function mime_fetch_body ($imap_stream, $id, $ent_id) { -- 2.25.1