diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-01-08 08:37:55 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-01-08 08:37:55 +0000 |
| commit | 592ec5bb1023848829feb51a314a1f323751558a (patch) | |
| tree | 2178500da8a1ddf460263ab413d678de33bd2b3e /roundcubemail/program | |
| parent | 50450b6587dc0725fda0cb8e9acfec3b92084fc5 (diff) | |
- Fix fallback to LOGIN auth (broken in r4389)
git-svn-id: https://svn.roundcube.net/trunk@4399 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap_generic.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php index b11266fd7..166a106a1 100644 --- a/roundcubemail/program/include/rcube_imap_generic.php +++ b/roundcubemail/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 { |
