Browse Source

Close connection cleanly when login/pw incorrect, following RFC recommendation.

Thijs Kinkhorst 21 years ago
parent
commit
850e646c72
1 changed files with 3 additions and 1 deletions
  1. 3 1
      functions/imap_general.php

+ 3 - 1
functions/imap_general.php

@@ -721,6 +721,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();
+                /* terminate the session nicely */
+                sqimap_logout($imap_stream);
                 logout_error( _("Unknown user or password incorrect.") );
                 exit;
             }
@@ -988,4 +990,4 @@ function map_yp_alias($username) {
    return chop(substr($yp, strlen($username)+1));
 }
 
-?>
+?>