[Svn] r2170 - in trunk/roundcubemail: . program/lib/Net

trac at roundcube.net trac at roundcube.net
Thu Dec 18 11:15:40 CET 2008


Author: alec
Date: 2008-12-18 04:15:39 -0600 (Thu, 18 Dec 2008)
New Revision: 2170

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/lib/Net/SMTP.php
Log:
- Fix STARTTLS before AUTH in SMTP connection (#1484883)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2008-12-17 11:19:24 UTC (rev 2169)
+++ trunk/roundcubemail/CHANGELOG	2008-12-18 10:15:39 UTC (rev 2170)
@@ -1,6 +1,10 @@
 CHANGELOG RoundCube Webmail
 ---------------------------
 
+2008/12/18 (alec)
+----------
+- Fix STARTTLS before AUTH in SMTP connection (#1484883)
+
 2008/12/16 (thomasb)
 ----------
 - Only abbreviate file name for IE browsers (#1485063)

Modified: trunk/roundcubemail/program/lib/Net/SMTP.php
===================================================================
--- trunk/roundcubemail/program/lib/Net/SMTP.php	2008-12-17 11:19:24 UTC (rev 2169)
+++ trunk/roundcubemail/program/lib/Net/SMTP.php	2008-12-18 10:15:39 UTC (rev 2170)
@@ -375,7 +375,7 @@
 
             return true;
         }
-
+console($this->_arguments);
         foreach ($this->_arguments as $argument) {
             $verb = strtok($argument, ' ');
             $arguments = substr($argument, strlen($verb) + 1,
@@ -424,11 +424,8 @@
      */
     function auth($uid, $pwd , $method = '')
     {
-        if (empty($this->_esmtp['AUTH'])) {
-            if (version_compare(PHP_VERSION, '5.1.0', '>=')) {
-                if (!isset($this->_esmtp['STARTTLS'])) {
-                    return PEAR::raiseError('SMTP server does not support authentication');
-                }
+        if (version_compare(PHP_VERSION, '5.1.0', '>=') && isset($this->_esmtp['STARTTLS'])) {
+
                 if (PEAR::isError($result = $this->_put('STARTTLS'))) {
                     return $result;
                 }
@@ -444,12 +441,10 @@
                 /* Send EHLO again to recieve the AUTH string from the
                  * SMTP server. */
                 $this->_negotiate();
-                if (empty($this->_esmtp['AUTH'])) {
-                    return PEAR::raiseError('SMTP server does not support authentication');
-                }
-            } else {
-                return PEAR::raiseError('SMTP server does not support authentication');
-            }
+	}
+        
+	if (empty($this->_esmtp['AUTH'])) {
+            return PEAR::raiseError('SMTP server does not support authentication');
         }
 
         /* If no method has been specified, get the name of the best

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



More information about the Svn mailing list