From cd5d18fa36ffdc5bb1ebbfa473548f0819f59fe0 Mon Sep 17 00:00:00 2001 From: laf Date: Sat, 11 Apr 2015 21:01:33 +0100 Subject: [PATCH 1/2] Added redirect when a POST value is found --- html/includes/authenticate.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/includes/authenticate.inc.php b/html/includes/authenticate.inc.php index 42dc82b33..28877973a 100644 --- a/html/includes/authenticate.inc.php +++ b/html/includes/authenticate.inc.php @@ -108,6 +108,9 @@ if ((isset($_SESSION['username'])) || (isset($_COOKIE['sess_id'],$_COOKIE['token setcookie("auth", $_COOKIE['auth'], time()+60*60*24*$config['auth_remember'], "/", null, false, true); } $permissions = permissions_cache($_SESSION['user_id']); + if (isset($_POST['username'])) { + header('Location: '.$_SERVER['REQUEST_URI'],TRUE,303); + } } elseif (isset($_SESSION['username'])) { From 52004231a2571365023404dc6b7234b358a2ad5b Mon Sep 17 00:00:00 2001 From: laf Date: Sun, 12 Apr 2015 09:22:08 +0100 Subject: [PATCH 2/2] added exit after redirect --- html/includes/authenticate.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/html/includes/authenticate.inc.php b/html/includes/authenticate.inc.php index 28877973a..e64465a35 100644 --- a/html/includes/authenticate.inc.php +++ b/html/includes/authenticate.inc.php @@ -110,6 +110,7 @@ if ((isset($_SESSION['username'])) || (isset($_COOKIE['sess_id'],$_COOKIE['token $permissions = permissions_cache($_SESSION['user_id']); if (isset($_POST['username'])) { header('Location: '.$_SERVER['REQUEST_URI'],TRUE,303); + exit; } } elseif (isset($_SESSION['username']))