- Fix fallback to LOGIN auth (broken in r4389)

release-0.6
alecpl 14 years ago
parent a3861ba02f
commit 808d1617ef

@ -768,10 +768,14 @@ class rcube_imap_generic
$auth_methods = $auth_caps; $auth_methods = $auth_caps;
} }
// RFC 2595 (LOGINDISABLED) LOGIN disabled when connection is not secure // RFC 2595 (LOGINDISABLED) LOGIN disabled when connection is not secure
if (($key = array_search('LOGIN', $auth_methods)) !== false $login_disabled = $this->getCapability('LOGINDISABLED');
&& $this->getCapability('LOGINDISABLED') if (($key = array_search('LOGIN', $auth_methods)) !== false) {
) { if ($login_disabled) {
unset($auth_methods[$key]); unset($auth_methods[$key]);
}
}
else if (!$login_disabled) {
$auth_methods[] = 'LOGIN';
} }
} }
else { else {

Loading…
Cancel
Save