From d9897300b41c5e4eaae171f48da631948cc4a47b Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 1 Dec 2008 21:26:45 -0700 Subject: [PATCH] Fix MD5 auth; catch NIL ID responses. --- framework/Imap_Client/lib/Horde/Imap/Client/Socket.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php index b1245ae81..d7bb775b6 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket.php @@ -490,7 +490,7 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base switch ($method) { case 'CRAM-MD5': case 'DIGEST-MD5': - $this->_sendLine('AUTHENTICATE ' . $method); + $ob = $this->_sendLine('AUTHENTICATE ' . $method, array('noparse' => true)); switch ($method) { case 'CRAM-MD5': @@ -627,7 +627,9 @@ class Horde_Imap_Client_Socket extends Horde_Imap_Client_Base $d = reset($data); if (is_array($d)) { for ($i = 0, $cnt = count($d); $i < $cnt; $i += 2) { - $this->_temp['id'][$d[$i]] = $d[$i + 1]; + if ($d[$i + 1] != 'NIL') { + $this->_temp['id'][$d[$i]] = $d[$i + 1]; + } } } } -- 2.11.0