diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 01e5d4f928..c63d84b953 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,9 @@ +2010-12-27 Ramon Novoa + + * lib/PandoraFMS/DB.pm, lib/PandoraFMS/Core.pm: Removed calls to + safe_input related to tserver.name. Server names are not + converted to HTML entities yet. + 2010-12-27 Ramon Novoa * lib/PandoraFMS/Config.pm: Updated version strings for the 3.2 diff --git a/pandora_server/lib/PandoraFMS/Core.pm b/pandora_server/lib/PandoraFMS/Core.pm index e9df68bde7..d43dee8528 100644 --- a/pandora_server/lib/PandoraFMS/Core.pm +++ b/pandora_server/lib/PandoraFMS/Core.pm @@ -1193,12 +1193,12 @@ sub pandora_create_agent ($$$$$$$$$$;$$$$$) { # Test if the optional positional parameters are defined or GIS is disabled if (!defined ($timezone_offset) ) { $agent_id = db_insert ($dbh, 'INSERT INTO tagente (`nombre`, `direccion`, `comentarios`, `id_grupo`, `id_os`, `server_name`, `intervalo`, `id_parent`, `modo`) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address, $description, $group_id, $os_id, safe_input($server_name), $interval, $parent_id); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address, $description, $group_id, $os_id, $server_name, $interval, $parent_id); } else { $agent_id = db_insert ($dbh, 'INSERT INTO tagente (`nombre`, `direccion`, `comentarios`, `id_grupo`, `id_os`, `server_name`, `intervalo`, `id_parent`, `timezone_offset`, `modo` ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 1)', safe_input($agent_name), $address, - $description, $group_id, $os_id, safe_input($server_name), $interval, $parent_id, $timezone_offset); + $description, $group_id, $os_id, $server_name, $interval, $parent_id, $timezone_offset); } if (defined ($longitude) && defined ($latitude ) && $pa_config->{'activate_gis'} == 1 ) { if (!defined($altitude)) { diff --git a/pandora_server/lib/PandoraFMS/DB.pm b/pandora_server/lib/PandoraFMS/DB.pm index d0b6e2497e..1e0babaa6f 100644 --- a/pandora_server/lib/PandoraFMS/DB.pm +++ b/pandora_server/lib/PandoraFMS/DB.pm @@ -115,7 +115,7 @@ sub get_server_id ($$$) { my $rc = get_db_value ($dbh, "SELECT id_server FROM tserver WHERE name = ? AND server_type = ?", - safe_input($server_name), $server_type); + $server_name, $server_type); return defined ($rc) ? $rc : -1; }