diff --git a/pandora_console/include/api.php b/pandora_console/include/api.php index 20028d4b61..0e6083d3e2 100644 --- a/pandora_console/include/api.php +++ b/pandora_console/include/api.php @@ -118,7 +118,7 @@ if ($info === 'version') { if (empty($apiPassword) === true || (empty($apiPassword) === false && $api_password === $apiPassword) || $apiTokenValid === true -) { +) { if (enterprise_hook('metaconsole_validate_origin', [get_parameter('server_auth')]) === true || enterprise_hook('console_validate_origin', [get_parameter('server_auth')]) === true ) { @@ -129,16 +129,15 @@ if (empty($apiPassword) === true // Compat. $config['id_user'] = 'admin'; $correctLogin = true; - // Bypass credentials if server-auth and api-pass are correct. + // Bypass credentials if server-auth and api-pass are correct. } else if (($config['server_unique_identifier'] === get_parameter('server_auth')) - && ($api_password === $apiPassword) - && ((bool) isInACL($ipOrigin) === true)) { - + && ($api_password === $apiPassword) + && ((bool) isInACL($ipOrigin) === true) + ) { $config['id_usuario'] = 'admin'; $config['id_user'] = 'admin'; $correctLogin = true; - - } else if ((bool) isInACL($ipOrigin) === true) { + } else if ((bool) isInACL($ipOrigin) === true) { // External access. // Token is valid. Bypass the credentials. if ($apiTokenValid === true) { diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_icon.php b/pandora_console/include/lib/Dashboard/Widgets/module_icon.php index 24d1c7e207..e5c68eab11 100644 --- a/pandora_console/include/lib/Dashboard/Widgets/module_icon.php +++ b/pandora_console/include/lib/Dashboard/Widgets/module_icon.php @@ -540,12 +540,6 @@ class ModuleIconWidget extends Widget $output = ''; - $id_group = \agents_get_agent_group($this->values['agentId']); - - $modulesAgent = \modules_get_agentmodule_agent( - $this->values['moduleId'] - ); - $data_module = \modules_get_last_value( $this->values['moduleId'] ); @@ -574,33 +568,37 @@ class ModuleIconWidget extends Widget // General div. $output .= '