From b6f60c45aa209c40bc894f51a33a49cabad1ddbc Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 18 Dec 2017 23:39:34 -0500 Subject: [PATCH] Fix double login issue - Removed session existence check in killme - Changed returned value in session_write for empty data --- boot.php | 8 +------- include/session.php | 6 +++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/boot.php b/boot.php index 00058727f5..0dd8e03f25 100644 --- a/boot.php +++ b/boot.php @@ -928,14 +928,8 @@ function login($register = false, $hiddens = false) */ function killme() { - global $session_exists; - if (!get_app()->is_backend()) { - if (!$session_exists) { - session_abort(); - } else { - session_write_close(); - } + session_write_close(); } exit(); diff --git a/include/session.php b/include/session.php index 54c17e3754..66df498fe0 100644 --- a/include/session.php +++ b/include/session.php @@ -61,10 +61,14 @@ function ref_session_write($id, $data) { global $session_exists, $session_expire; - if (!$id || !$data) { + if (!$id) { return false; } + if (!$data) { + return true; + } + $expire = time() + $session_expire; $default_expire = time() + 300; -- 2.39.5