From 632528ff4281fbceedb828969bd355f21106529c Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 6 Jul 2011 16:46:35 +0000 Subject: - Fix infinite loop in tokenizeResponse() when server returns atoms with forbidden characters --- program/include/rcube_imap_generic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'program/include/rcube_imap_generic.php') diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index a30fbc0fd..e3c987cd3 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -3237,8 +3237,8 @@ class rcube_imap_generic break; } - // excluded chars: SP, CTL, (, ), {, ", ], % - if (preg_match('/^([\x21\x23\x24\x26\x27\x2A-\x5C\x5E-\x7A\x7C-\x7E]+)/', $str, $m)) { + // excluded chars: SP, CTL, ) + if (preg_match('/^([^\x00-\x20\x29\x7F]+)/', $str, $m)) { $result[] = $m[1] == 'NIL' ? NULL : $m[1]; $str = substr($str, strlen($m[1])); } -- cgit v1.2.3