X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=program%2Finclude%2Frcube_imap_generic.php;fp=program%2Finclude%2Frcube_imap_generic.php;h=324f94dbb9a56eecfba2037cf95953c37d73c0b6;hb=81942a239bba3e46191211a3231ecfadd91ac038;hp=e2ee342f82603d8da0769a8697df6fa3ed8b9daf;hpb=07e1de2dcd3f3ff8910a3680493f035b3c693cf0;p=roundcube.git diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index e2ee342..324f94d 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -21,7 +21,7 @@ | Author: Ryo Chijiiwa | +-----------------------------------------------------------------------+ - $Id: rcube_imap_generic.php 4643 2011-04-11 12:24:00Z alec $ + $Id: rcube_imap_generic.php 4729 2011-05-04 18:53:11Z alec $ */ @@ -777,13 +777,6 @@ class rcube_imap_generic // Now we're secure, capabilities need to be reread $this->clearCapability(); } - - // Use best (for security) supported authentication method - foreach (array('DIGEST-MD5', 'CRAM-MD5', 'CRAM_MD5', 'PLAIN', 'LOGIN') as $auth_method) { - if (in_array($auth_method, $auth_methods)) { - break; - } - } } // Send ID info @@ -809,13 +802,13 @@ class rcube_imap_generic else if (!$login_disabled) { $auth_methods[] = 'LOGIN'; } - - // Use best (for security) supported authentication method - foreach (array('DIGEST-MD5', 'CRAM-MD5', 'CRAM_MD5', 'PLAIN', 'LOGIN') as $auth_method) { - if (in_array($auth_method, $auth_methods)) { - break; - } - } + + // Use best (for security) supported authentication method + foreach (array('DIGEST-MD5', 'CRAM-MD5', 'CRAM_MD5', 'PLAIN', 'LOGIN') as $auth_method) { + if (in_array($auth_method, $auth_methods)) { + break; + } + } } else { // Prevent from sending credentials in plain text when connection is not secure @@ -1214,8 +1207,8 @@ class rcube_imap_generic { if (is_array($items) && !empty($items)) { foreach ($items as $key => $value) { - $args[] = $this->escape($key); - $args[] = $this->escape($value); + $args[] = $this->escape($key, true); + $args[] = $this->escape($value, true); } } @@ -1226,7 +1219,7 @@ class rcube_imap_generic if ($code == self::ERROR_OK && preg_match('/\* ID /i', $response)) { $response = substr($response, 5); // remove prefix "* ID " - $items = $this->tokenizeResponse($response); + $items = $this->tokenizeResponse($response, 1); $result = null; for ($i=0, $len=count($items); $i<$len; $i += 2) {