[Svn] r4555 - in branches/release-0.5: . plugins/archive plugins/archive/localization plugins/autologon plugins/help/localization plugins/http_authentication plugins/managesieve plugins/managesieve/lib plugins/managesieve/lib/Net plugins/managesieve/localization plugins/managesieve/tests plugins/markasjunk plugins/markasjunk/localization plugins/new_user_identity plugins/password plugins/password/drivers plugins/password/localization plugins/show_additional_headers plugins/squirrelmail_usercopy plugins/subscriptions_option/localization plugins/userinfo/localization plugins/vcard_attachments plugins/vcard_attachments/localization plugins/virtuser_file plugins/virtuser_query

trac at roundcube.net trac at roundcube.net
Wed Feb 16 11:48:12 CET 2011


Author: alec
Date: 2011-02-16 04:48:11 -0600 (Wed, 16 Feb 2011)
New Revision: 4555

Added:
   branches/release-0.5/plugins/managesieve/tests/
   branches/release-0.5/plugins/managesieve/tests/Makefile
   branches/release-0.5/plugins/managesieve/tests/parser.phpt
   branches/release-0.5/plugins/managesieve/tests/tokenize.phpt
Modified:
   branches/release-0.5/CHANGELOG
   branches/release-0.5/plugins/archive/archive.php
   branches/release-0.5/plugins/archive/localization/cs_CZ.inc
   branches/release-0.5/plugins/autologon/autologon.php
   branches/release-0.5/plugins/help/localization/cs_CZ.inc
   branches/release-0.5/plugins/help/localization/ru_RU.inc
   branches/release-0.5/plugins/http_authentication/http_authentication.php
   branches/release-0.5/plugins/managesieve/Changelog
   branches/release-0.5/plugins/managesieve/lib/Net/Sieve.php
   branches/release-0.5/plugins/managesieve/lib/rcube_sieve.php
   branches/release-0.5/plugins/managesieve/localization/es_ES.inc
   branches/release-0.5/plugins/managesieve/localization/fr_FR.inc
   branches/release-0.5/plugins/managesieve/localization/ru_RU.inc
   branches/release-0.5/plugins/managesieve/managesieve.js
   branches/release-0.5/plugins/managesieve/managesieve.php
   branches/release-0.5/plugins/markasjunk/localization/cs_CZ.inc
   branches/release-0.5/plugins/markasjunk/markasjunk.php
   branches/release-0.5/plugins/markasjunk/package.xml
   branches/release-0.5/plugins/new_user_identity/new_user_identity.php
   branches/release-0.5/plugins/password/README
   branches/release-0.5/plugins/password/config.inc.php.dist
   branches/release-0.5/plugins/password/drivers/directadmin.php
   branches/release-0.5/plugins/password/drivers/ldap.php
   branches/release-0.5/plugins/password/drivers/ldap_simple.php
   branches/release-0.5/plugins/password/drivers/virtualmin.php
   branches/release-0.5/plugins/password/drivers/xmail.php
   branches/release-0.5/plugins/password/localization/es_ES.inc
   branches/release-0.5/plugins/password/localization/ru_RU.inc
   branches/release-0.5/plugins/password/package.xml
   branches/release-0.5/plugins/password/password.js
   branches/release-0.5/plugins/password/password.php
   branches/release-0.5/plugins/show_additional_headers/show_additional_headers.php
   branches/release-0.5/plugins/squirrelmail_usercopy/squirrelmail_usercopy.php
   branches/release-0.5/plugins/subscriptions_option/localization/cs_CZ.inc
   branches/release-0.5/plugins/userinfo/localization/cs_CZ.inc
   branches/release-0.5/plugins/vcard_attachments/localization/cs_CZ.inc
   branches/release-0.5/plugins/vcard_attachments/localization/es_ES.inc
   branches/release-0.5/plugins/vcard_attachments/package.xml
   branches/release-0.5/plugins/virtuser_file/virtuser_file.php
   branches/release-0.5/plugins/virtuser_query/virtuser_query.php
Log:
- Applied plugin changes since 0.5-stable release


Modified: branches/release-0.5/CHANGELOG
===================================================================
--- branches/release-0.5/CHANGELOG	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/CHANGELOG	2011-02-16 10:48:11 UTC (rev 4555)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Applied plugin changes since 0.5-stable release
 - Fix SQL query in rcube_user::query() so it uses index on MySQL again
 - Use only one from IMAP authentication methods to prevent login delays (1487784)
 - Fix strftime format support in date_today option

Modified: branches/release-0.5/plugins/archive/archive.php
===================================================================
--- branches/release-0.5/plugins/archive/archive.php	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/archive/archive.php	2011-02-16 10:48:11 UTC (rev 4555)
@@ -30,6 +30,8 @@
             'command' => 'plugin.archive',
             'imagepas' => $skin_path.'/archive_pas.png',
             'imageact' => $skin_path.'/archive_act.png',
+            'width' => 32,
+            'height' => 32,
             'title' => 'buttontitle',
             'domain' => $this->ID,
         ),

Modified: branches/release-0.5/plugins/archive/localization/cs_CZ.inc
===================================================================
--- branches/release-0.5/plugins/archive/localization/cs_CZ.inc	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/archive/localization/cs_CZ.inc	2011-02-16 10:48:11 UTC (rev 4555)
@@ -6,7 +6,7 @@
 | language/cs_CZ/labels.inc                                             |
 |                                                                       |
 | Language file of the Roundcube archive plugin                         |
-| Copyright (C) 2005-2009, Roundcube Dev. - Switzerland                 |
+| Copyright (C) 2005-2009, The Roundcube Dev Team                       |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

Modified: branches/release-0.5/plugins/autologon/autologon.php
===================================================================
--- branches/release-0.5/plugins/autologon/autologon.php	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/autologon/autologon.php	2011-02-16 10:48:11 UTC (rev 4555)
@@ -31,6 +31,8 @@
       $args['user'] = 'me';
       $args['pass'] = '******';
       $args['host'] = 'localhost';
+      $args['cookiecheck'] = false;
+      $args['valid'] = true;
     }
   
     return $args;

Modified: branches/release-0.5/plugins/help/localization/cs_CZ.inc
===================================================================
--- branches/release-0.5/plugins/help/localization/cs_CZ.inc	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/help/localization/cs_CZ.inc	2011-02-16 10:48:11 UTC (rev 4555)
@@ -6,7 +6,7 @@
 | language/cs_CZ/labels.inc                                             |
 |                                                                       |
 | Language file of the Roundcube help plugin                            |
-| Copyright (C) 2005-2009, Roundcube Dev. - Switzerland                 |
+| Copyright (C) 2005-2009, The Roundcube Dev Team                       |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

Modified: branches/release-0.5/plugins/help/localization/ru_RU.inc
===================================================================
--- branches/release-0.5/plugins/help/localization/ru_RU.inc	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/help/localization/ru_RU.inc	2011-02-16 10:48:11 UTC (rev 4555)
@@ -6,7 +6,7 @@
 | plugins/help/localization/ru_RU.inc                                   |
 |                                                                       |
 | Language file of the Roundcube help plugin                            |
-| Copyright (C) 2005-2010, Roundcube Dev. - Switzerland                 |
+| Copyright (C) 2005-2010, The Roundcube Dev Team                       |
 | Licensed under the GNU GPL                                            |
 |                                                                       |
 +-----------------------------------------------------------------------+

Modified: branches/release-0.5/plugins/http_authentication/http_authentication.php
===================================================================
--- branches/release-0.5/plugins/http_authentication/http_authentication.php	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/http_authentication/http_authentication.php	2011-02-16 10:48:11 UTC (rev 4555)
@@ -5,7 +5,7 @@
  *
  * Make use of an existing HTTP authentication and perform login with the existing user credentials
  *
- * @version 1.1
+ * @version 1.2
  * @author Thomas Bruederli
  */
 class http_authentication extends rcube_plugin
@@ -36,6 +36,7 @@
     }
     
     $args['cookiecheck'] = false;
+    $args['valid'] = true;
   
     return $args;
   }

Modified: branches/release-0.5/plugins/managesieve/Changelog
===================================================================
--- branches/release-0.5/plugins/managesieve/Changelog	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/managesieve/Changelog	2011-02-16 10:48:11 UTC (rev 4555)
@@ -1,6 +1,15 @@
+- Fix escaping of backslash character in quoted strings (#1487780)
+- Fix STARTTLS for timsieved < 2.3.10
+
+* version 3.0 [2011-02-01]
+-----------------------------------------------------------
 - Added support for SASL proxy authentication (#1486691)
 - Fixed parsing of scripts with \r\n line separator
 - Apply forgotten changes for form errors handling
+- Fix multi-line strings parsing (#1487685)
+- Added tests for script parser
+- Rewritten script parser
+- Fix double request when clicking on Filters tab using Firefox
 
 * version 2.10 [2010-10-10]
 -----------------------------------------------------------

Modified: branches/release-0.5/plugins/managesieve/lib/Net/Sieve.php
===================================================================
--- branches/release-0.5/plugins/managesieve/lib/Net/Sieve.php	2011-02-16 09:42:31 UTC (rev 4554)
+++ branches/release-0.5/plugins/managesieve/lib/Net/Sieve.php	2011-02-16 10:48:11 UTC (rev 4555)
@@ -763,7 +763,7 @@
             return $res;
         }
 
-        return preg_replace('/{[0-9]+}\r\n/', '', $res);
+        return preg_replace('/^{[0-9]+}\r\n/', '', $res);
     }
 
     /**
@@ -981,6 +981,28 @@
     }
 
     /**
+     * Receives x bytes from the server.
+     *
+     * @param int $length  Number of bytes to read
+     *
+     * @return string  The server response.
+     */
+    function _recvBytes($length)
+    {
+        $response = '';
+        $response_length = 0;
+
+        while ($response_length < $length) {
+            $response .= $this->_sock->read($length - $response_length);
+            $response_length = $this->_getLineLength($response);
+        }
+
+        $this->_debug("S: " . rtrim($response));
+
+        return $response;
+    }
+
+    /**
      * Send a command and retrieves a response from the server.
      *
      * @param string $cmd   The command to send.
@@ -1013,11 +1035,11 @@
 
                 if ('NO' == substr($uc_line, 0, 2)) {
                     // Check for string literal error message.
-                    if (preg_match('/^no {([0-9]+)\+?}/i', $line, $matches)) {
-                        $line .= str_replace(
-                            "\r\n", ' ', $this->_sock->read($matches[1] + 2)
-                        );
-                        $this->_debug("S: $line");
+                    if (preg_match('/{([0-9]+)}$/i', $line, $matches)) {
+                        $line = substr($line, 0, -(strlen($matches[1])+2))
+                            . str_replace(
+                                "\r\n", ' ', $this->_recvBytes($matches[1] + 2)
+                            );
                     }
                     return PEAR::raiseError(trim($response . substr($line, 2)), 3);
                 }
@@ -1052,16 +1074,9 @@
                     return PEAR::raiseError(trim($response . $line), 6);
                 }
 
-                if (preg_match('/^{([0-9]+)\+?}/i', $line, $matches)) {
-                    // Matches String Responses.
-                    $str_size = $matches[1] + 2;
-                    $line = '';
-                    $line_length = 0;
-                    while ($line_length < $str_size) {
-                        $line .= $this->_sock->read($str_size - $line_length);
-                        $line_length