From 4ff06dbdf5c5b07e2c3841bc0907977d10070bc6 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Fri, 10 Jul 2026 13:50:06 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B09625=20-=20Code=20review=20updates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/loginwebpage.class.inc.php | 2 +- sources/Service/Session/Session.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/application/loginwebpage.class.inc.php b/application/loginwebpage.class.inc.php index 515ed00f17..18140c5586 100644 --- a/application/loginwebpage.class.inc.php +++ b/application/loginwebpage.class.inc.php @@ -25,11 +25,11 @@ */ use Combodo\iTop\Application\Branding; -use Combodo\iTop\Application\Helper\Session; use Combodo\iTop\Application\WebPage\ErrorPage; use Combodo\iTop\Application\WebPage\NiceWebPage; use Combodo\iTop\Service\Events\EventData; use Combodo\iTop\Service\Events\EventService; +use Combodo\iTop\Service\Session\Session; /** * Web page used for displaying the login form diff --git a/sources/Service/Session/Session.php b/sources/Service/Session/Session.php index f3952603a9..b2145205f5 100644 --- a/sources/Service/Session/Session.php +++ b/sources/Service/Session/Session.php @@ -139,8 +139,12 @@ class Session */ public static function UnsetAll(): void { - foreach (self::ListVariables() as $sKey) { - self::Unset($sKey); + if (session_status() !== PHP_SESSION_ACTIVE) { + self::Start(); + $_SESSION = []; + self::WriteClose(); + } else { + $_SESSION = []; } }