From 356a3cc9c3988c2ed04faa5ea88e4c31fb2a274a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Su=C3=A1rez?= Date: Wed, 12 Jul 2023 08:31:52 -0600 Subject: [PATCH] Modify aditional user/pass on core. --- pandora_console/include/api.php | 3 +-- pandora_server/lib/PandoraFMS/Core.pm | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pandora_console/include/api.php b/pandora_console/include/api.php index 7ed38d638c..20028d4b61 100644 --- a/pandora_console/include/api.php +++ b/pandora_console/include/api.php @@ -130,8 +130,7 @@ if (empty($apiPassword) === true $config['id_user'] = 'admin'; $correctLogin = true; // Bypass credentials if server-auth and api-pass are correct. - } else if (($op === 'get') - && ($config['server_unique_identifier'] === get_parameter('server_auth')) + } else if (($config['server_unique_identifier'] === get_parameter('server_auth')) && ($api_password === $apiPassword) && ((bool) isInACL($ipOrigin) === true)) { diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index c513a7816f..a615d68a4a 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1561,8 +1561,7 @@ sub pandora_execute_action ($$$$$$$$$;$$) { my $params = {}; $params->{"apipass"} = $pa_config->{"console_api_pass"}; - $params->{"user"} ||= $pa_config->{"console_user"}; - $params->{"pass"} ||= $pa_config->{"console_pass"}; + $params->{"server_auth"} = $pa_config->{"server_unique_identifier"}; $params->{"op"} = "get"; $params->{"op2"} = "module_graph"; $params->{"id"} = $module->{'id_agente_modulo'};