From 8a62bcf28318243e109105419782fcc951655224 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 25 May 2023 09:51:20 +0200 Subject: [PATCH] #11277 Fixed public_dashboard with saml --- pandora_console/ajax.php | 2 +- pandora_console/operation/dashboard/public_dashboard.php | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pandora_console/ajax.php b/pandora_console/ajax.php index bea9dfc771..67ce4e382b 100644 --- a/pandora_console/ajax.php +++ b/pandora_console/ajax.php @@ -185,7 +185,7 @@ if (isset($config['force_instant_logout']) === true header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - if ($config['auth'] === 'saml') { + if ($config['auth'] === 'saml' && empty($public_hash) === true) { include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; $as = new SimpleSAML_Auth_Simple('PandoraFMS'); $as->logout(); diff --git a/pandora_console/operation/dashboard/public_dashboard.php b/pandora_console/operation/dashboard/public_dashboard.php index 33d6ffd199..9af12f7581 100644 --- a/pandora_console/operation/dashboard/public_dashboard.php +++ b/pandora_console/operation/dashboard/public_dashboard.php @@ -52,12 +52,6 @@ if ($config['force_instant_logout'] === true) { session_destroy(); header_remove('Set-Cookie'); setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/'); - - if ($config['auth'] == 'saml') { - include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; - $as = new SimpleSAML_Auth_Simple('PandoraFMS'); - $as->logout(); - } } while (ob_get_length() > 0) {