From 9cebf8ee34a67a4973bdd993ad6b791bb4710b62 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 13 May 2015 10:15:13 +0200 Subject: [PATCH] This is more effective code from fixed bug, tiquet: #2216 (cherry picked from commit 4a52fcff58ebfca1fff934118f5fadb68a018e89) --- pandora_server/lib/PandoraFMS/Core.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index 35c4349685..34b94682d2 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -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),