From 5103495a461ed90f23b5ec890dca73935bff0c68 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Wed, 2 Aug 2023 14:08:08 +0200 Subject: Updated 19 files and added assets/icons/new/menu.svg (automated) --- pages/api/reauthenticate.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pages/api/reauthenticate.php') diff --git a/pages/api/reauthenticate.php b/pages/api/reauthenticate.php index 2b5a8ca..b194098 100644 --- a/pages/api/reauthenticate.php +++ b/pages/api/reauthenticate.php @@ -26,9 +26,10 @@ if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) { $old["last"] = time(); $old["profile"] = $_PROFILE; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($_PROFILE)); } else if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLowerLoggedIn) { - $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $_COOKIE['PEH2_SESSION_TOKEN']), true); + $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $_COOKIE['PEH2_SESSION_TOKEN']), true); if (!isset($_GET["plain"])) { $old["name"] = base64_decode($_GET["name"] ?? "LQo="); @@ -41,7 +42,8 @@ if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) { $old["last"] = time(); $old["profile"] = $_PROFILE; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $newToken, json_encode($old)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($_PROFILE)); } die($newToken); \ No newline at end of file -- cgit