Changeset 3801 in subversion
- Timestamp:
- Jul 1, 2010 6:18:44 AM (3 years ago)
- Location:
- trunk/plugins/managesieve
- Files:
-
- 2 edited
-
Changelog (modified) (1 diff)
-
lib/Net/Sieve.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/managesieve/Changelog
r3750 r3801 1 - Update Net_Sieve to version 1. 2.21 - Update Net_Sieve to version 1.3.0 (fixes LOGIN athentication) 2 2 3 3 * version 2.6 [2010-06-03] -
trunk/plugins/managesieve/lib/Net/Sieve.php
r3750 r3801 40 40 * @copyright 2006-2008 Anish Mistry 41 41 * @license http://www.opensource.org/licenses/bsd-license.php BSD 42 * @version SVN: $Id: Sieve.php 300 419 2010-06-13 12:10:10Z yunosh $42 * @version SVN: $Id: Sieve.php 300898 2010-07-01 09:49:02Z yunosh $ 43 43 * @link http://pear.php.net/package/Net_Sieve 44 44 */ … … 84 84 * @copyright 2006-2008 Anish Mistry 85 85 * @license http://www.opensource.org/licenses/bsd-license.php BSD 86 * @version Release: 1. 2.286 * @version Release: 1.3.0 87 87 * @link http://pear.php.net/package/Net_Sieve 88 88 * @link http://www.ietf.org/rfc/rfc3028.txt RFC 3028 (Sieve: A Mail … … 205 205 * @param array $options Additional options for 206 206 * stream_context_create(). 207 * @param mixed $handler A callback handler for the debug output. 207 208 */ 208 209 function Net_Sieve($user = null, $pass = null, $host = 'localhost', 209 $port = 2000, $logintype = '', $euser = '', $debug = false, 210 $bypassAuth = false, $useTLS = true, $options = null 211 ) { 210 $port = 2000, $logintype = '', $euser = '', 211 $debug = false, $bypassAuth = false, $useTLS = true, 212 $options = null, $handler = null) 213 { 212 214 $this->_state = NET_SIEVE_STATE_DISCONNECTED; 213 215 $this->_data['user'] = $user; … … 218 220 $this->_data['euser'] = $euser; 219 221 $this->_sock = new Net_Socket(); 220 $this->_debug = $debug;221 222 $this->_bypassAuth = $bypassAuth; 222 223 $this->_useTLS = $useTLS; 223 224 $this->_options = $options; 225 $this->setDebug($debug, $handler); 224 226 225 227 /* Try to include the Auth_SASL package. If the package is not … … 636 638 return $result; 637 639 } 638 if (PEAR::isError($result = $this->_doCmd('"' . base64_encode($user) . '"' ))) {640 if (PEAR::isError($result = $this->_doCmd('"' . base64_encode($user) . '"', true))) { 639 641 return $result; 640 642 } 641 return $this->_doCmd('"' . base64_encode($pass) . '"' );643 return $this->_doCmd('"' . base64_encode($pass) . '"', true); 642 644 } 643 645 … … 1100 1102 return PEAR::raiseError('This server doesn\'t support any authentication methods. SASL problem?'); 1101 1103 } 1102 1103 $serverMethods = $this->_capability['sasl']; 1104 if (!$this->_capability['sasl']) { 1105 return PEAR::raiseError('This server doesn\'t support any authentication methods.'); 1106 } 1104 1107 1105 1108 if ($userMethod) { 1106 $methods = array($userMethod); 1107 } else { 1108 $methods = $this->supportedAuthMethods; 1109 } 1110 1111 if (!$methods || !$serverMethods) { 1109 if (in_array($userMethod, $this->_capability['sasl'])) { 1110 return $userMethod; 1111 } 1112 1112 return PEAR::raiseError( 1113 'This server doesn\'t support any authentication methods.' 1114 ); 1115 } 1116 1117 foreach ($methods as $method) { 1118 if (in_array($method, $serverMethods)) { 1113 sprintf('No supported authentication method found. The server supports these methods: %s, but we want to use: %s', 1114 implode(', ', $this->_capability['sasl']), 1115 $userMethod)); 1116 } 1117 1118 foreach ($this->supportedAuthMethods as $method) { 1119 if (in_array($method, $this->_capability['sasl'])) { 1119 1120 return $method; 1120 1121 } … … 1122 1123 1123 1124 return PEAR::raiseError( 1124 'No supported authentication method found. The server supports these methods: ' 1125 . implode(',', $serverMethods) 1126 . ', but we only support: ' 1127 . implode(',', $this->supportedAuthMethods) 1128 ); 1125 sprintf('No supported authentication method found. The server supports these methods: %s, but we only support: %s', 1126 implode(', ', $this->_capability['sasl']), 1127 implode(', ', $this->supportedAuthMethods))); 1129 1128 } 1130 1129
Note: See TracChangeset
for help on using the changeset viewer.
