From f6cd95a165c5de73e4008d8e3e4b6845b2bff561 Mon Sep 17 00:00:00 2001 From: jangliss Date: Wed, 28 Nov 2007 02:46:02 +0000 Subject: [PATCH] Added code to stop PHP using 'deleted' as a value for the session cookies on expiring them, and forcing a really old date for the expiry time (#1829098). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12794 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 2 ++ functions/global.php | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 139a7f3a..45d05ae1 100644 --- 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) -------------------------------------- diff --git a/functions/global.php b/functions/global.php index c09716d6..c3b61129 100644 --- a/functions/global.php +++ b/functions/global.php @@ -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 )) { -- 2.25.1