diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4fe236c98e..1d0791f6b7 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2009-10-08 Ramon Novoa + + * include/functions_ui.php, + include/functions_incidents.php, + operation/incidents/incident_detail.php: Security related fixes. + Thanks to ~finalbeta and ~remove from the Global-Evolution Security + Group. + 2009-10-07 Miguel de Dios * pandoradb.sql, extras/pandoradb_migrate_v2.x_to_v3.0.sql: change the field diff --git a/pandora_console/include/functions_incidents.php b/pandora_console/include/functions_incidents.php index cf52795031..8a4334d5db 100644 --- a/pandora_console/include/functions_incidents.php +++ b/pandora_console/include/functions_incidents.php @@ -136,6 +136,10 @@ function process_incidents_touch ($id_incident) { return false; } $id_incident = implode (",", $id_incident); + if (empty ($id_incident)) { + return false; + } + $sql = sprintf ("UPDATE tincidencia SET id_lastupdate = '%s' WHERE id_incidencia IN (%s)", $config["id_user"], $id_incident); return process_sql ($sql); } diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 5551102bb1..c8cf663856 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -1186,7 +1186,7 @@ function get_url_refresh ($params = false, $relative = true, $add_post = true) { continue; if (strstr ($key, 'delete')) continue; - $url .= $key.'='.$value.'&'; + $url .= $key.'='.$value.'&'; } if ($add_post) { @@ -1201,22 +1201,23 @@ function get_url_refresh ($params = false, $relative = true, $add_post = true) { continue; if (strstr ($key, 'delete')) continue; - $url .= $key.'='.$value.'&'; + $url .= $key.'='.$value.'&'; } } foreach ($params as $key => $value) { if ($value === false) continue; - $url .= $key.'='.$value.'&'; + $url .= $key.'='.$value.'&'; } /* Removes final & */ - $pos = strrpos ($url, '&', 0); + $pos = strrpos ($url, '&', 0); if ($pos) { $url = substr_replace ($url, '', $pos, 5); } + $url = htmlspecialchars ($url); if (! $relative) { return get_full_url ($url); } diff --git a/pandora_console/operation/incidents/incident_detail.php b/pandora_console/operation/incidents/incident_detail.php index 2cf0728ffd..b3532d5d7c 100644 --- a/pandora_console/operation/incidents/incident_detail.php +++ b/pandora_console/operation/incidents/incident_detail.php @@ -36,7 +36,7 @@ $actualizacion = get_system_time (); // EDITION MODE if (isset ($_GET["id"])) { - $id_inc = get_parameter_get ("id", 0); + $id_inc = (int) get_parameter_get ("id", 0); // Obtain group of this incident $row = get_db_row ("tincidencia","id_incidencia",$id_inc);