From 09e5feef05591868fa7039539df4b7677576c4b7 Mon Sep 17 00:00:00 2001 From: "marcos.alconada" Date: Mon, 8 Jul 2019 17:02:28 +0200 Subject: [PATCH] add message no acces saml without saml.php file --- pandora_console/general/noaccesssaml.php | 164 +++++++++++++++++++++++ pandora_console/index.php | 9 +- 2 files changed, 170 insertions(+), 3 deletions(-) create mode 100644 pandora_console/general/noaccesssaml.php diff --git a/pandora_console/general/noaccesssaml.php b/pandora_console/general/noaccesssaml.php new file mode 100644 index 0000000000..e357e040dc --- /dev/null +++ b/pandora_console/general/noaccesssaml.php @@ -0,0 +1,164 @@ + + + + + + + +
+ +
+ images/input_cross.png'> +
+ +
+
+ +
+ +
+
'; + echo __('Please make sure you have SAML authentication properly configured. For more information the error to access this page are recorded in security logs of %s System Database', get_product_name()); + ?> + +
+ +
+ OK +
+
+
+ +
+ + + + + diff --git a/pandora_console/index.php b/pandora_console/index.php index 3c95074171..320a33da3b 100755 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -359,12 +359,15 @@ if (! isset($config['id_user'])) { $nick_in_db = $_SESSION['prepared_login_da']['id_user']; $expired_pass = false; } else if (($config['auth'] == 'saml') && ($login_button_saml)) { - include_once ENTERPRISE_DIR.'/include/auth/saml.php'; - - $saml_user_id = saml_process_user_login(); + if (!include_once 'include/auth/saml.php') { + include_once 'general/noaccesssaml.php'; + } else { + $saml_user_id = saml_process_user_login(); + } $nick_in_db = $saml_user_id; if (!$nick_in_db) { + include_once 'general/noaccesssaml.php'; include_once $config['saml_path'].'simplesamlphp/lib/_autoload.php'; $as = new SimpleSAML_Auth_Simple('PandoraFMS'); $as->logout();