From: ebullient Date: Thu, 6 Feb 2003 21:49:01 +0000 (+0000) Subject: Fix odd behavior from login-redirect. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=db6a919294361cb4efbd0d6c66696fe5d2c4515e;p=squirrelmail.git Fix odd behavior from login-redirect. When you are redirected to login, session_post_vars is created to save your state (for the case where you were writing a message and got logged out). If, for example, you were just going directly to webmail.php, or a different page, and were required to login, this array would be created, and it would be empty. In this case, we are directed back to webmail.php, which doesn't use any post vars. If we don't clear this array, it hangs around in the session until the first time you get to the compose screen - at which time, the fact that it's empty causes all kinds of trouble. So, in the future, we need to encorporate into the initialization process a mechanism to make sure that vars like this get cleared out for pages that don't need them. But this will solve redirects to webmail.php for now. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4507 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/webmail.php b/src/webmail.php index 85676fd5..ebbb24ac 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -45,6 +45,9 @@ if (isset($_SESSION['onetimepad'])) { if (isset($_GET['right_frame'])) { $right_frame = $_GET['right_frame']; } +if ( isset($_SESSION['session_expired_post']) ) { + sqsession_unregister('session_expired_post'); +} is_logged_in();