From eb89b15c0f044673c1206a418a21d0baba1a675e Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sun, 12 Mar 2023 19:16:53 +0100 Subject: Updated 104 files, added 3 files, deleted 4 files and renamed 36 files (automated) --- auth/callback/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'auth') diff --git a/auth/callback/index.php b/auth/callback/index.php index 8419364..8d040e9 100644 --- a/auth/callback/index.php +++ b/auth/callback/index.php @@ -56,6 +56,12 @@ if (isset($result["access_token"])) { header("Set-Cookie: PEH2_SESSION_TOKEN=" . $token . "; SameSite=None; Path=/; Secure; HttpOnly; Expires=" . date("r", time() + (86400 * 730))); - header("Location: /"); + if (isset($_COOKIE["PEH2_RETURN_PAGE"])) { + header("Location: " . str_replace("\n", "", str_replace("\r", "", $_COOKIE["PEH2_RETURN_PAGE"]))); + } else { + header("Location: /"); + } + + setcookie("PEH2_RETURN_PAGE", ""); die(); } \ No newline at end of file -- cgit