[Svn] r4399 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Sat Jan 8 09:37:55 CET 2011


Author: alec
Date: 2011-01-08 02:37:55 -0600 (Sat, 08 Jan 2011)
New Revision: 4399

Modified:
   trunk/roundcubemail/program/include/rcube_imap_generic.php
Log:
- Fix fallback to LOGIN auth (broken in r4389)


Modified: trunk/roundcubemail/program/include/rcube_imap_generic.php
===================================================================
--- trunk/roundcubemail/program/include/rcube_imap_generic.php	2011-01-06 13:58:13 UTC (rev 4398)
+++ trunk/roundcubemail/program/include/rcube_imap_generic.php	2011-01-08 08:37:55 UTC (rev 4399)
@@ -768,11 +768,15 @@
                 $auth_methods = $auth_caps;
             }
             // RFC 2595 (LOGINDISABLED) LOGIN disabled when connection is not secure
-            if (($key = array_search('LOGIN', $auth_methods)) !== false
-                && $this->getCapability('LOGINDISABLED')
-            ) {
-                unset($auth_methods[$key]);
+            $login_disabled = $this->getCapability('LOGINDISABLED');
+            if (($key = array_search('LOGIN', $auth_methods)) !== false) {
+                if ($login_disabled) {
+                    unset($auth_methods[$key]);
+                }
             }
+            else if (!$login_disabled) {
+                $auth_methods[] = 'LOGIN';
+            }
         }
         else {
             // Prevent from sending credentials in plain text when connection is not secure

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



More information about the Svn mailing list