Added code to stop PHP using 'deleted' as a value for the session cookies on expiring...
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 28 Nov 2007 02:46:02 +0000 (02:46 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 28 Nov 2007 02:46:02 +0000 (02:46 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12794 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/global.php

index 139a7f3a3000786c23a8c4288bff06497d037e86..45d05ae158370e89e1cbfe7b008f7e5d01e5b537 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -234,6 +234,8 @@ Version 1.5.2 - SVN
     John Callahan (#1808382).
   - Invalid initialization of To: header (#1772893).
   - Added SquirrelMail debug mode.
+  - Handle PHP's insistence on setting the value to 'deleted' for destroyed sessions
+    (#1829098).
 
 Version 1.5.1 (branched on 2006-02-12)
 --------------------------------------
index c09716d691ff2557081744bc3b6ea95b873e22a3..c3b611299e4a6d5a3c47e0483b531e298b4e452f 100644 (file)
@@ -374,9 +374,8 @@ function sqsession_destroy() {
 
     global $base_uri, $_COOKIE, $_SESSION;
 
-    if (isset($_COOKIE[session_name()]) && session_name()) sqsetcookie(session_name(), '', 0, $base_uri);
-    if (isset($_COOKIE['username']) && $_COOKIE['username']) sqsetcookie('username','',0,$base_uri);
-    if (isset($_COOKIE['key']) && $_COOKIE['key']) sqsetcookie('key','',0,$base_uri);
+    if (isset($_COOKIE[session_name()]) && session_name()) sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri);
+    if (isset($_COOKIE['key']) && $_COOKIE['key']) sqsetcookie('key','SQMTRASH',1,$base_uri);
 
     $sessid = session_id();
     if (!empty( $sessid )) {