diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js index 0e545e9f4e..5b96a8fcd6 100644 --- a/pandora_console/include/javascript/pandora.js +++ b/pandora_console/include/javascript/pandora.js @@ -134,7 +134,8 @@ function agent_changed_by_multiple_agents(event, id_agent, selected) { $("input.module_types_excluded").each(function(index, el) { var module_type = parseInt($(el).val()); - if (module_type !== NaN) module_types_excluded.push(module_type); + if (isNaN(module_type) == false) + module_types_excluded.push(module_type); }); } catch (error) {} } diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 1f47f75d17..2293a6044a 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -91,7 +91,7 @@ if (is_ajax()) { if ($get_agents_group_json) { $id_group = (int) get_parameter('id_group'); - $recursion = (get_parameter_switch('recursion', 'false') === 'true'); + $recursion = filter_var(get_parameter_switch('recursion', 'false'), FILTER_VALIDATE_BOOLEAN); $id_os = get_parameter('id_os', ''); $agent_name = get_parameter('name', ''); @@ -801,7 +801,7 @@ if (is_ajax()) { } } else { $sql = sprintf( - 'SELECT DISTINCT t1.nombre, t1.id_agente_modulo FROM tagente_modulo t1 + 'SELECT t1.nombre, t1.id_agente_modulo FROM tagente_modulo t1 INNER JOIN tagente_estado t2 ON t1.id_agente_modulo = t2.id_agente_modulo %s WHERE %s AND t1.delete_pending = 0 AND t1.id_agente IN ('.implode(',', $idAgents).')