summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-03-06 19:43:49 +0000
committeralecpl <alec@alec.pl>2012-03-06 19:43:49 +0000
commitab5036eef72185f0419108c5b6b73a5181a48da2 (patch)
tree20af044497f53e6a6ff6b06e22a2bf8510082b46
parent053538bf60e354a64664fb9a992cbbda37d70f76 (diff)
- Merge r5969 from trunk
-rw-r--r--CHANGELOG1
-rw-r--r--program/include/rcube_imap_generic.php5
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d1ddab964..1aef31f1f 100644
--- a/CHANGELOG
+++ b/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 of HTML messages from Disqus (#1488372)
- Disable E_STRICT warnings on PHP 5.4
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 00802eba3..3fd961022 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -3511,13 +3511,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, '\\"') . '"';