diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-03-06 19:42:23 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-03-06 19:42:23 +0000 |
| commit | e5d1df6adf244470ec5373b34435b75615a6462f (patch) | |
| tree | b646a853a913decf97a96c9f583ce46aa9fbfa3b /roundcubemail | |
| parent | 69be3a2a97cf856dbbbbffc9dccc047c0a701842 (diff) | |
- Fix handling of % character in IMAP protocol (#1488382)
git-svn-id: https://svn.roundcube.net/trunk@5969 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_imap_generic.php | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 5864b2b2b..929c04b67 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix handling of % character in IMAP protocol (#1488382) - Fix duplicate names handling in addressbook searches (#1488375) - Fix displaying HTML messages from Disqus (#1488372) - Exclude E_STRICT from error_reporting for PHP 5.4 diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php index cffb250fb..f286ec6bd 100644 --- a/roundcubemail/program/include/rcube_imap_generic.php +++ b/roundcubemail/program/include/rcube_imap_generic.php @@ -3616,13 +3616,16 @@ class rcube_imap_generic if ($string === null) { return 'NIL'; } + if ($string === '') { return '""'; } + // atom-string (only safe characters) - if (!$force_quotes && !preg_match('/[\x00-\x20\x22\x28-\x2A\x5B-\x5D\x7B\x7D\x80-\xFF]/', $string)) { + if (!$force_quotes && !preg_match('/[\x00-\x20\x22\x25\x28-\x2A\x5B-\x5D\x7B\x7D\x80-\xFF]/', $string)) { return $string; } + // quoted-string if (!preg_match('/[\r\n\x00\x80-\xFF]/', $string)) { return '"' . addcslashes($string, '\\"') . '"'; |
