This is more effective code from fixed bug, tiquet:

(cherry picked from commit 4a52fcff58)
This commit is contained in:
m-lopez-f 2015-05-13 10:15:13 +02:00
parent dc5deadcd4
commit 9cebf8ee34
1 changed files with 2 additions and 2 deletions
pandora_server/lib/PandoraFMS

View File

@ -270,7 +270,7 @@ sub get_agent_from_name ($$) {
return undef if (! defined ($name) || $name eq '');
return get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE tagente.nombre = ?', $name);
return get_db_single_row ($dbh, 'SELECT * FROM tagente WHERE tagente.nombre = ?', safe_input($name));
}
##########################################################################
@ -1117,7 +1117,7 @@ sub pandora_execute_action ($$$$$$$$$;$) {
$pa_config,
$event_text,
(defined ($agent) ? $agent->{'id_grupo'} : 0),
(defined ($agent) ? $agent->{'id_agente'} : 0),
(defined ($fullagent) ? $fullagent->{'id_agente'} : 0),
$priority,
(defined($alert) ? $alert->{'id'} : 0),
(defined($alert) ? $alert->{'id_agent_module'} : 0),