summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap_generic.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_imap_generic.php')
-rw-r--r--program/include/rcube_imap_generic.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index b11266fd7..166a106a1 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -768,10 +768,14 @@ class rcube_imap_generic
$auth_methods = $auth_caps;
}
// RFC 2595 (LOGINDISABLED) LOGIN disabled when connection is not secure
- if (($key = array_search('LOGIN', $auth_methods)) !== false
- && $this->getCapability('LOGINDISABLED')
- ) {
- unset($auth_methods[$key]);
+ $login_disabled = $this->getCapability('LOGINDISABLED');
+ if (($key = array_search('LOGIN', $auth_methods)) !== false) {
+ if ($login_disabled) {
+ unset($auth_methods[$key]);
+ }
+ }
+ else if (!$login_disabled) {
+ $auth_methods[] = 'LOGIN';
}
}
else {