From: kink Date: Mon, 8 Mar 2004 18:47:58 +0000 (+0000) Subject: Only test for LOGINDISABLED when the auth method actually is 'login'. X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=6d611a768978f76e2956a5c994aaca1376cf8a48 Only test for LOGINDISABLED when the auth method actually is 'login'. Otherwise, servers which only allow e.g. CRAM/DIGEST-MD5 are locked out. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6759 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/login.php b/src/login.php index db45ed6d..7b541aba 100644 --- a/src/login.php +++ b/src/login.php @@ -55,17 +55,19 @@ header('Pragma: no-cache'); * squelches the display of the login form and puts up a message * explaining the situation. */ -$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 logins are disabled.
"; - if (!$use_imap_tls) { - $string .= "The use of TLS may allow SquirrelMail to login.
"; +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 logins are disabled.
"; + if (!$use_imap_tls) { + $string .= "The use of TLS may allow SquirrelMail to login.
"; + } + $string .= "Please contact your system administrator."; + error_box($string,$color); + exit; } - $string .= "Please contact your system administrator."; - error_box($string,$color); - exit; } do_hook('login_cookie');