From c0c5cf6acfaf81c8649d79fa917b1bfb47928ecb Mon Sep 17 00:00:00 2001 From: tokul Date: Sun, 17 Apr 2005 12:28:42 +0000 Subject: [PATCH] disabled LOGINDISABLED check, when imap server is mapped with external function git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9327 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/login.php | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/login.php b/src/login.php index 90f16c3f..15f365cf 100644 --- a/src/login.php +++ b/src/login.php @@ -60,18 +60,24 @@ header('Pragma: no-cache'); * explaining the situation. */ if($imap_auth_mech == 'login') { - $imap = sqimap_create_stream($imapServerAddress, $imapPort, $use_imap_tls); - $logindisabled = sqimap_capability($imap,'LOGINDISABLED'); - sqimap_logout($imap); - if ($logindisabled) { - $string = _("The IMAP server is reporting that plain text logins are disabled.").'
'. - _("Using CRAM-MD5 or DIGEST-MD5 authentication instead may work.").'
'; - if (!$use_imap_tls) { - $string .= _("Also, the use of TLS may allow SquirrelMail to login.").'
'; + /** + * detect disabled login, only when imapServerAddress contains + * server address and not mapping. See sqimap_get_user_server() + */ + if (substr($imapServerAddress, 0, 4) != "map:") { + $imap = sqimap_create_stream($imapServerAddress, $imapPort, $use_imap_tls); + $logindisabled = sqimap_capability($imap,'LOGINDISABLED'); + sqimap_logout($imap); + if ($logindisabled) { + $string = _("The IMAP server is reporting that plain text logins are disabled.").'
'. + _("Using CRAM-MD5 or DIGEST-MD5 authentication instead may work.").'
'; + if (!$use_imap_tls) { + $string .= _("Also, the use of TLS may allow SquirrelMail to login.").'
'; + } + $string .= _("Please contact your system administrator and report this error."); + error_box($string,$color); + exit; } - $string .= _("Please contact your system administrator and report this error."); - error_box($string,$color); - exit; } } -- 2.25.1