[Svn] r4495 - in trunk/plugins/managesieve: . lib/Net

trac at roundcube.net trac at roundcube.net
Fri Feb 4 17:50:05 CET 2011


Author: alec
Date: 2011-02-04 10:50:05 -0600 (Fri, 04 Feb 2011)
New Revision: 4495

Modified:
   trunk/plugins/managesieve/Changelog
   trunk/plugins/managesieve/lib/Net/Sieve.php
Log:
- Fix STARTTLS for timsieved < 2.3.10


Modified: trunk/plugins/managesieve/Changelog
===================================================================
--- trunk/plugins/managesieve/Changelog	2011-02-04 13:44:47 UTC (rev 4494)
+++ trunk/plugins/managesieve/Changelog	2011-02-04 16:50:05 UTC (rev 4495)
@@ -1,3 +1,5 @@
+- Fix STARTTLS for timsieved < 2.3.10
+
 * version 3.0 [2011-02-01]
 -----------------------------------------------------------
 - Added support for SASL proxy authentication (#1486691)

Modified: trunk/plugins/managesieve/lib/Net/Sieve.php
===================================================================
--- trunk/plugins/managesieve/lib/Net/Sieve.php	2011-02-04 13:44:47 UTC (rev 4494)
+++ trunk/plugins/managesieve/lib/Net/Sieve.php	2011-02-04 16:50:05 UTC (rev 4495)
@@ -1161,7 +1161,13 @@
 
         // The server should be sending a CAPABILITY response after
         // negotiating TLS. Read it, and ignore if it doesn't.
-        $this->_doCmd();
+        // Doesn't work with older timsieved versions
+        $regexp = '/^CYRUS TIMSIEVED V([0-9.]+)/';
+        if (!preg_match($regexp, $this->_capability['implementation'], $matches)
+            || version_compare($matches[1], '2.3.10', '>=')
+        ) {
+            $this->_doCmd();
+        }
 
         // RFC says we need to query the server capabilities again now that we
         // are under encryption.

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list