Changeset 2170 in subversion


Ignore:
Timestamp:
Dec 18, 2008 5:15:39 AM (4 years ago)
Author:
alec
Message:
  • Fix STARTTLS before AUTH in SMTP connection (#1484883)
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r2160 r2170  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/12/18 (alec) 
     5---------- 
     6- Fix STARTTLS before AUTH in SMTP connection (#1484883) 
    37 
    482008/12/16 (thomasb) 
  • trunk/roundcubemail/program/lib/Net/SMTP.php

    r969 r2170  
    376376            return true; 
    377377        } 
    378  
     378console($this->_arguments); 
    379379        foreach ($this->_arguments as $argument) { 
    380380            $verb = strtok($argument, ' '); 
     
    425425    function auth($uid, $pwd , $method = '') 
    426426    { 
    427         if (empty($this->_esmtp['AUTH'])) { 
    428             if (version_compare(PHP_VERSION, '5.1.0', '>=')) { 
    429                 if (!isset($this->_esmtp['STARTTLS'])) { 
    430                     return PEAR::raiseError('SMTP server does not support authentication'); 
    431                 } 
     427        if (version_compare(PHP_VERSION, '5.1.0', '>=') && isset($this->_esmtp['STARTTLS'])) { 
     428 
    432429                if (PEAR::isError($result = $this->_put('STARTTLS'))) { 
    433430                    return $result; 
     
    445442                 * SMTP server. */ 
    446443                $this->_negotiate(); 
    447                 if (empty($this->_esmtp['AUTH'])) { 
    448                     return PEAR::raiseError('SMTP server does not support authentication'); 
    449                 } 
    450             } else { 
    451                 return PEAR::raiseError('SMTP server does not support authentication'); 
    452             } 
     444        } 
     445         
     446        if (empty($this->_esmtp['AUTH'])) { 
     447            return PEAR::raiseError('SMTP server does not support authentication'); 
    453448        } 
    454449 
Note: See TracChangeset for help on using the changeset viewer.