From 49ed286d02358864508109b11bec536570561da2 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sun, 21 Sep 2014 13:05:26 +0100 Subject: Pass GET requests through the logon process if initially signed out --- index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index acd7de7..8a56c8d 100644 --- a/index.php +++ b/index.php @@ -3,6 +3,12 @@ include('config.php'); $signout = 'Sign out'; +if (isset($_GET) && count($_GET) > 0) { + $getstring = "?" . http_build_query($_GET); +} else { + $getstring = ""; +} + if (isset($_GET['signout'])) { if (isset($_COOKIE['password'])) { unset($_COOKIE['password']); @@ -20,7 +26,7 @@ if ($_POST && $pass) { /* Cookie expires when browser closes */ setcookie('password', hash("sha256", $_POST['password']), false, '/', $_SERVER['SERVER_NAME'] ); } - header('Location: ' . $url); + header('Location: ' . $url . $getstring); } else { header('Location: ' . $url); exit(); @@ -40,7 +46,7 @@ if ($_POST && $pass) { -
+


Remember me

-- cgit v1.2.3