Branch 'kolab-syncroton-2.2' - lib/ext

Aleksander Machniak machniak at kolabsys.com
Tue Oct 8 19:15:28 CEST 2013


 lib/ext/Roundcube/rcube_imap_generic.php |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 31408352c09d107d45c7ef94cd59050bd1981e17
Author: Aleksander Machniak <alec at alec.pl>
Date:   Tue Oct 8 19:14:40 2013 +0200

     Workaround cyrus-murder bug in SETANNOTATION arguments handling (Bug #1883)

diff --git a/lib/ext/Roundcube/rcube_imap_generic.php b/lib/ext/Roundcube/rcube_imap_generic.php
index e119374..3138465 100644
--- a/lib/ext/Roundcube/rcube_imap_generic.php
+++ b/lib/ext/Roundcube/rcube_imap_generic.php
@@ -48,6 +48,8 @@ class rcube_imap_generic
         '*'        => '\\*',
     );
 
+    public static $mupdate;
+
     private $fp;
     private $host;
     private $logged = false;
@@ -3137,6 +3139,12 @@ class rcube_imap_generic
         }
 
         foreach ($data as $entry) {
+            // If we are running in a murder topology, the entry[2] string needs
+            // to be escaped.
+            if (self::$mupdate) {
+                $entry[2] = addcslashes($entry[2], '\\"');
+            }
+
             // ANNOTATEMORE drafts before version 08 require quoted parameters
             $entries[] = sprintf('%s (%s %s)', $this->escape($entry[0], true),
                 $this->escape($entry[1], true), $this->escape($entry[2], true));
@@ -3701,6 +3709,10 @@ class rcube_imap_generic
             $this->prefs['literal+'] = true;
         }
 
+        if (preg_match('/(\[| )MUPDATE=.*/', $str)) {
+            self::$mupdate = true;
+        }
+
         if ($trusted) {
             $this->capability_readed = true;
         }




More information about the commits mailing list