From 3d75e045f9f9141dc421659ef1c84934b7939722 Mon Sep 17 00:00:00 2001 From: alejandro-campos Date: Thu, 27 Jun 2019 17:42:29 +0200 Subject: [PATCH] added new fields to saml configuration and added check to not allow user creation with all group in case an empty value was specified in group name attribute input --- pandora_console/include/functions_config.php | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 5a11249f74..61e16be8ab 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -668,10 +668,22 @@ function config_update_config() $error_update[] = __('Saml group name parameter'); } + if (!config_update_value('saml_attr_type', (bool) get_parameter('saml_attr_type'))) { + $error_update[] = __('Saml attr type parameter'); + } + if (!config_update_value('saml_profiles_and_tags', get_parameter('saml_profiles_and_tags'))) { $error_update[] = __('Saml profiles and tags parameter'); } + if (!config_update_value('saml_profile', get_parameter('saml_profile'))) { + $error_update[] = __('Saml profile parameters'); + } + + if (!config_update_value('saml_tag', get_parameter('saml_tag'))) { + $error_update[] = __('Saml tag parameter'); + } + if (!config_update_value('saml_profile_tag_separator', get_parameter('saml_profile_tag_separator'))) { $error_update[] = __('Saml profile and tag separator'); } @@ -2404,10 +2416,22 @@ function config_process_config() config_update_value('saml_group_name', ''); } + if (!isset($config['saml_attr_type'])) { + config_update_value('saml_attr_type', false); + } + if (!isset($config['saml_profiles_and_tags'])) { config_update_value('saml_profiles_and_tags', ''); } + if (!isset($config['saml_profile'])) { + config_update_value('saml_profile', ''); + } + + if (!isset($config['saml_tag'])) { + config_update_value('saml_tag', ''); + } + if (!isset($config['saml_profile_tag_separator'])) { config_update_value('saml_profile_tag_separator', ''); }