alecpl
2012-03-06 8b3c68d42d4ee142449f9249590b45658b93cd26
- Fix handling of % character in IMAP protocol (#1488382)


2 files modified
6 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/include/rcube_imap_generic.php 5 ●●●● patch | view | raw | blame | history
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
program/include/rcube_imap_generic.php
@@ -3616,13 +3616,16 @@
        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, '\\"') . '"';