浏览代码

Fix test for signout.php in the logged in check in init.php so it
cannot be circumvented by manipulating the URL. External plugins migh
rely on init.php guarranteeing that the user is logged in.
Thanks Stefan Esser for finding this.

Thijs Kinkhorst 18 年之前
父节点
当前提交
2d79bd2f50
共有 3 个文件被更改,包括 10 次插入4 次删除
  1. 5 2
      ChangeLog
  2. 2 2
      include/init.php
  3. 3 0
      src/signout.php

+ 5 - 2
ChangeLog

@@ -201,9 +201,12 @@ Version 1.5.2 - SVN
     images. Thanks to Mikhail Markin, Tomas Kuliavas and Michael Jordon
     for reporting these issues. [CVE-2007-1262]
   - Fix busy loop and notice when two literals in IMAP fetch (#1739433).
-  - Resolved issue with compose session not being updated after send/safe.
+  - Resolved issue with compose session not being updated after send/save.
   - Added ability to detect HTTP_X_FORWARDED_PROTO in get_location(),
-    thanks to Daniel Watts
+    thanks to Daniel Watts.
+  - Fix test for signout.php in the logged in check in init.php so it
+    cannot be circumvented by manipulating the URL. External plugins migh
+    rely on init.php guarranteeing that the user is logged in.
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------

+ 2 - 2
include/init.php

@@ -417,8 +417,8 @@ switch ($sInitLocation) {
             // signout page will deal with users who aren't logged
             // in on its own; don't show error here
             //
-            if (strpos($PHP_SELF, 'signout.php') !== FALSE) {
-            return;
+            if ( defined('PAGE_SIGNOUT') ) {
+                return;
             }
 
             /**

+ 3 - 0
src/signout.php

@@ -11,6 +11,9 @@
  * @package squirrelmail
  */
 
+/** This is the signout page */
+define('PAGE_SIGNOUT', 1);
+
 /**
  * Include the SquirrelMail initialization file.
  */