From 7c0ebe66680bd02f28c6c472ea192b3d714382da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 11 Apr 2023 17:47:36 +0200 Subject: [PATCH] fix url passed to 'redirect_after_login' --- public/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index f8b38bd..0468f42 100644 --- a/public/index.php +++ b/public/index.php @@ -29,7 +29,7 @@ if ($match !== null) { } if (!$authorized) { - Container::$request->session()->set('redirect_after_login', $url); + Container::$request->session()->set('redirect_after_login', substr($_SERVER['REQUEST_URI'], strlen('/'))); $response = new Redirect(Container::$routeCollection->getRoute('login')->generateLink(), IRedirect::TEMPORARY); header('Location: ' . $response->getUrl(), true, $response->getHttpCode()); return;