From e5f6fc276a29bd716c2799b9a11b0d63b85d0ef2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 27 Sep 2023 09:48:19 +0200 Subject: [PATCH] ActionController: Always reload window when redirecting to the login This ensures that, if CSP is enabled, the newly created token on the login is accepted by the browser. A small, but IMHO desired, side effect is that the login now always appears in the default theme. fixes #5126 --- library/Icinga/Web/Controller/ActionController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Web/Controller/ActionController.php b/library/Icinga/Web/Controller/ActionController.php index e13622ea7d..2e36d7d022 100644 --- a/library/Icinga/Web/Controller/ActionController.php +++ b/library/Icinga/Web/Controller/ActionController.php @@ -399,7 +399,8 @@ protected function redirectToLogin($redirect = null) } } - $this->rerenderLayout()->redirectNow($login); + $this->getResponse()->setReloadWindow(true); + $this->redirectNow($login); } protected function rerenderLayout()