From 0d5b29a28cbcf7b868f0712eb2629d4c77bfedf5 Mon Sep 17 00:00:00 2001 From: alec Date: Wed, 9 Feb 2011 12:01:29 +0000 Subject: - Add workaround for DBMail's bug http://www.dbmail.org/mantis/view.php?id=881 (#1487766) git-svn-id: https://svn.roundcube.net/trunk@4514 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_imap_generic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php index dace4efd2..e7a9cedf3 100644 --- a/roundcubemail/program/include/rcube_imap_generic.php +++ b/roundcubemail/program/include/rcube_imap_generic.php @@ -3313,10 +3313,11 @@ class rcube_imap_generic else if ($string === '') { return '""'; } + // need quoted-string? find special chars: SP, CTL, (, ), {, %, *, ", \, ] + // plus [ character as a workaround for DBMail's bug (#1487766) else if ($force_quotes || - preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5C\x5D\x7F]+)/', $string) + preg_match('/([\x00-\x20\x28-\x29\x7B\x25\x2A\x22\x5B\x5C\x5D\x7F]+)/', $string) ) { - // string: special chars: SP, CTL, (, ), {, %, *, ", \, ] return '"' . strtr($string, array('"'=>'\\"', '\\' => '\\\\')) . '"'; } -- cgit v1.2.3