diff options
author | Minteck <contact@minteck.org> | 2022-08-26 22:29:23 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-08-26 22:29:23 +0200 |
commit | 09bd0164ebc020a54b944b7326dcba496fb5d82c (patch) | |
tree | 0c5e765e627ecc94e534ccb6e2bc83917d58dc4c /pages/logout.php | |
parent | a2df9a69dcc14cb70118cda2ded499055e7ee358 (diff) | |
download | pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.gz pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.bz2 pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.zip |
idk when was the last commit so I'm making a new one - Violet Dawn
Diffstat (limited to 'pages/logout.php')
-rw-r--r-- | pages/logout.php | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/pages/logout.php b/pages/logout.php index ea1bfce..0263278 100644 --- a/pages/logout.php +++ b/pages/logout.php @@ -1,16 +1,15 @@ <?php if (isset($_COOKIE['PEH2_SESSION_TOKEN'])) { - if (str_contains($_COOKIE['PEH2_SESSION_TOKEN'], ".") || str_contains($_COOKIE['PEH2_SESSION_TOKEN'], "/")) { - header("Location: /") and die(); - } - if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN'])))) { unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_SESSION_TOKEN']))); - header("Location: /") and die(); - } else { - header("Location: /") and die(); } -} else { - header("Location: /") and die(); -}
\ No newline at end of file +} + +if (isset($_COOKIE['PEH2_USER_TOKEN'])) { + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens-public/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_USER_TOKEN'])))) { + unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens-public/" . str_replace(".", "", str_replace("/", "", $_COOKIE['PEH2_USER_TOKEN']))); + } +} + +header("Location: /") and die();
\ No newline at end of file |