X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_general.php;h=9b8b9d6e9df4e8751c8133eb887db53053994450;hb=f612a235519e713ad10ad9fc1634648314b2349c;hp=24dd45fcda49c7dd81d9653360d1486c9247049b;hpb=bd9c880b180d3db597909c87c7cbf3fadef40be2;p=squirrelmail.git diff --git a/functions/imap_general.php b/functions/imap_general.php index 24dd45fc..9b8b9d6e 100755 --- a/functions/imap_general.php +++ b/functions/imap_general.php @@ -177,7 +177,7 @@ function sqimap_read_data ($imap_stream, $pre, $handle_errors, &$response, &$mes * will be displayed. This function returns the imap connection handle. */ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $hide) { - global $color, $squirrelmail_language, $HTTP_ACCEPT_LANGUAGE, $onetimepad; + global $color, $squirrelmail_language, $onetimepad; $imap_server_address = sqimap_get_user_server($imap_server_address, $username); @@ -235,8 +235,8 @@ function sqimap_login ($username, $password, $imap_server_address, $imap_port, $ set_up_language($squirrelmail_language, true); include_once(SM_PATH . 'functions/display_messages.php' ); + sqsession_destroy(); logout_error( _("Unknown user or password incorrect.") ); - session_destroy(); exit; } } else { @@ -420,6 +420,15 @@ function sqimap_append ($imap_stream, $sent_folder, $length) { function sqimap_append_done ($imap_stream) { fputs ($imap_stream, "\r\n"); $tmp = fgets ($imap_stream, 1024); + if (preg_match("/(.*)(BAD|NO)(.*)$/", $tmp, $regs)) { + set_up_language($squirrelmail_language); + echo "
\n" . + _("ERROR : Bad or malformed request.") . + "
\n" . + _("Server responded: ") . + $message . "

\n"; + exit; + } } function sqimap_get_user_server ($imap_server, $username) {