From 76f33356e3cb98694604649be7ca2eb2e0773d9b Mon Sep 17 00:00:00 2001 From: darode Date: Mon, 11 Jun 2012 15:48:49 +0000 Subject: [PATCH] 2012-06-11 Dario Rodriguez * operatoin/tree.php: Fixed a bug related to html tag id with strange characters. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6492 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/operation/tree.php | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 1cd069b318..a63dd8b868 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-06-11 Dario Rodriguez + + * operatoin/tree.php: Fixed a bug related to html tag id + with strange characters. + + MERGED FROM 4.0.2 + 2012-06-11 Dario Rodriguez * include/functions_modules.php, diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index 01a0846ef0..1caca4b38a 100644 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -55,7 +55,7 @@ if (is_ajax ()) } echo '
'; - echo ''; + echo '
'; //Agent name echo ''; if ($agent['disabled']) { @@ -279,7 +279,7 @@ if (is_ajax ()) $queryWhere = 'id_agente NOT IN (SELECT id_agent FROM tpolicy_agents)'; else $queryWhere = sprintf(' id_agente IN (SELECT id_agent FROM tpolicy_agents WHERE id_policy = %s)',$id); - + $sql = sprintf('SELECT * FROM tagente WHERE %s AND ( %s id_grupo IN (%s))', $queryWhere, $extra_sql, $groups_sql); break; @@ -300,6 +300,7 @@ if (is_ajax ()) WHERE nombre = \'%s\' ) AND (%s id_grupo IN (%s))', $name, $extra_sql, $groups_sql); + break; } @@ -508,20 +509,20 @@ if (is_ajax ()) WHERE t1.id_agente = ' . $id . $whereQuery; break; case 'module': - $name = str_replace(array('_articapandora_'.ord(' ').'_pandoraartica_', '_articapandora_'.ord('#').'_pandoraartica_'),array(' ','#'),$id_father); + $name = str_replace(array('_articapandora_'.ord(' ').'_pandoraartica_', '_articapandora_'.ord('#').'_pandoraartica_','_articapandora_'.ord('/').'_pandoraartica_'),array(' ','#','/'),$id_father); switch ($config["dbtype"]) { case "mysql": $sql = 'SELECT * FROM tagente_modulo AS t1 INNER JOIN tagente_estado AS t2 ON t1.id_agente_modulo = t2.id_agente_modulo - WHERE t1.id_agente = ' . $id . ' AND nombre COLLATE utf8_general_ci LIKE \'' . io_safe_input($name) . '\''; + WHERE t1.id_agente = ' . $id . ' AND nombre = \'' . io_safe_input($name) . '\''; break; case "postgresql": case "oracle": $sql = 'SELECT * FROM tagente_modulo AS t1 INNER JOIN tagente_estado AS t2 ON t1.id_agente_modulo = t2.id_agente_modulo - WHERE t1.id_agente = ' . $id . ' AND nombre COLLATE utf8_general_ci LIKE \'' . io_safe_input($name) . '\''; + WHERE t1.id_agente = ' . $id . ' AND nombre = \'' . io_safe_input($name) . '\''; break; } break;
'.__('Agent name').'