From 2e5ebdf3b266c35f9ffbc9a766e416ce68f72cc7 Mon Sep 17 00:00:00 2001 From: pdontthink Date: Sat, 8 May 2021 03:11:33 +0000 Subject: [PATCH] Browser seems to respond better when deleting the cookie if you void its value also; helps actually get the cookie to be removed even though this feels more like a browser problem... maybe it does not like a date in 1970? git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14920 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/global.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/functions/global.php b/functions/global.php index bb7b7be4..0e2dfa0b 100644 --- a/functions/global.php +++ b/functions/global.php @@ -491,7 +491,8 @@ function sqsession_destroy() { global $base_uri, $_COOKIE, $_SESSION; if (isset($_COOKIE[session_name()]) && session_name()) { - sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri); + // sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri); + sqsetcookie(session_name(), 'SQMTRASH', 1, $base_uri); /* * Make sure to kill /src and /src/ cookies, just in case there are @@ -502,8 +503,10 @@ function sqsession_destroy() { * or fixate the $base_uri cookie, so we don't worry about * trying to delete all of them here. */ - sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri . 'src'); - sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri . 'src/'); + // sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri . 'src'); + // sqsetcookie(session_name(), $_COOKIE[session_name()], 1, $base_uri . 'src/'); + sqsetcookie(session_name(), 'SQMTRASH', 1, $base_uri . 'src'); + sqsetcookie(session_name(), 'SQMTRASH', 1, $base_uri . 'src/'); } if (isset($_COOKIE['key']) && $_COOKIE['key']) sqsetcookie('key','SQMTRASH',1,$base_uri); -- 2.25.1