From 09d27318fca191b0ac6a1b0866395065f609b7e3 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 19 Sep 2017 02:43:19 +0200 Subject: [PATCH] login: optionally redirect to ?goto Upcoming feature to continue from forbidden requests. --- login.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/login.php b/login.php index 490422f..db276d1 100644 --- a/login.php +++ b/login.php @@ -8,7 +8,8 @@ if (isset($_POST['login'])) { if ($user = login($_POST['login'], $_POST['pass'])) { setcookie('login', $user['auth'], 0, '/'); - header("Location: /"); //TODO: goto + $target = ltrim(@$_GET['goto'], '/'); + header("Location: /$target"); http_response_code(302); exit; } -- 2.30.0