From e3a5112fa16aeb2898f98700052f60caf9460559 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Wed, 13 Dec 2023 13:16:34 +0100 Subject: [PATCH] Auth: Persist session before refreshing current logged in user --- library/Icinga/Authentication/Auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Authentication/Auth.php b/library/Icinga/Authentication/Auth.php index f358eac37e..f37b4e165a 100644 --- a/library/Icinga/Authentication/Auth.php +++ b/library/Icinga/Authentication/Auth.php @@ -326,7 +326,9 @@ public function hasPermission($permission) */ public function persistCurrentUser() { - // @TODO(el): https://dev.icinga.com/issues/10646 + // Persist the Icinga Web session beforehand, otherwise, session_get_cookie_params() won't get any of the + // configured cookie data in the [cookie] INI section e.g path "/" or domain "icinga.com". + Session::getSession()->write(); $params = session_get_cookie_params(); setcookie( 'icingaweb2-session',