浏览代码

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.

Erin Schnabel 22 年之前
父节点
当前提交
557c28f74c
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/webmail.php

+ 3 - 0
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();