From 87c61fd01524a6f9c6448ac553c04346512c1c7e Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Mon, 29 Apr 2024 17:20:17 +0200 Subject: [PATCH] #13085 added new input password in secondary ldap --- pandora_console/godmode/setup/setup_auth.php | 10 ++++++++-- pandora_console/include/functions_config.php | 6 ++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index e17d13806f..5d7922cce0 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -362,14 +362,20 @@ if (is_ajax() === true) { $row['name'] = __('Admin secondary LDAP password'); $row['control'] = html_print_input_password( 'ldap_admin_pass_secondary', - io_output_password($config['ldap_admin_pass_secondary']), + (empty(io_output_password($config['ldap_admin_pass_secondary'])) === false) ? '*****' : '', $alt = '', 60, 100, true, false, false, - 'w400px-important' + 'w400px-important', + 'on', + false, + '', + true, + false, + true ); $table->data['ldap_admin_pass_secondary'] = $row; break; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 7026165089..d4c71597fc 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -741,8 +741,10 @@ function config_update_config() $error_update[] = __('Admin secondary LDAP login'); } - if (config_update_value('ldap_admin_pass_secondary', get_parameter('ldap_admin_pass_secondary'), true, true) === false) { - $error_update[] = __('Admin secondary LDAP password'); + if ((bool) get_parameter('ldap_admin_pass_secondary_password_changed', false) === true) { + if (config_update_value('ldap_admin_pass_secondary', get_parameter('ldap_admin_pass_secondary'), true, true) === false) { + $error_update[] = __('Admin LDAP password secondary'); + } } if (config_update_value('fallback_local_auth', get_parameter('fallback_local_auth'), true) === false) {