From 2b55c06d9e58f65f3a4184473e6cf6fd0869e029 Mon Sep 17 00:00:00 2001 From: Daniel Preussker Date: Wed, 10 Feb 2016 14:31:16 +0000 Subject: [PATCH] Revert "Variable/Environment sanity" --- html/includes/vars.inc.php | 2 -- html/index.php | 8 ++++++++ includes/common.php | 10 ---------- includes/dbFacile.mysql.php | 2 -- includes/dbFacile.mysqli.php | 2 -- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/html/includes/vars.inc.php b/html/includes/vars.inc.php index c9008d2178..369a13a74a 100644 --- a/html/includes/vars.inc.php +++ b/html/includes/vars.inc.php @@ -43,5 +43,3 @@ foreach ($_GET as $name => $value) { foreach ($_POST as $name => $value) { $vars[$name] = $value; } - -array_walk_recursive($vars,'sanitize_array'); diff --git a/html/index.php b/html/index.php index 494d6c3dea..46164c663b 100644 --- a/html/index.php +++ b/html/index.php @@ -214,6 +214,14 @@ else {
"); + print_r($_GET); + print_r($vars); + echo(""); +} + if ($_SESSION['authenticated']) { // Authenticated. Print a page. if (isset($vars['page']) && !strstr("..", $vars['page']) && is_file("pages/" . $vars['page'] . ".inc.php")) { diff --git a/includes/common.php b/includes/common.php index 1162b819aa..8b59ba774a 100644 --- a/includes/common.php +++ b/includes/common.php @@ -1255,13 +1255,3 @@ function get_port_id ($ports_mapped, $port, $port_association_mode) { return $port_id; } - -/** - * Sanitize - * @param mixed $item Reference to Item - * @param mixed $key Key - * @return void - */ -function sanitize_array(&$item, $key) { - $item = htmlentities($item); -} diff --git a/includes/dbFacile.mysql.php b/includes/dbFacile.mysql.php index d9372cbb69..f2bb56c0be 100644 --- a/includes/dbFacile.mysql.php +++ b/includes/dbFacile.mysql.php @@ -266,7 +266,6 @@ function dbFetchRows($sql, $parameters=array(), $nocache=false) { if ($config['memcached']['enable'] && $nocache === false) { $config['memcached']['resource']->set(hash('sha512',$sql.'|'.serialize($parameters)),$rows,$config['memcached']['ttl']); } - array_walk_recursive($rows,'sanitize_array'); return $rows; } @@ -334,7 +333,6 @@ function dbFetchRow($sql=null, $parameters=array(), $nocache=false) { if ($config['memcached']['enable'] && $nocache === false) { $config['memcached']['resource']->set(hash('sha512',$sql.'|'.serialize($parameters)),$row,$config['memcached']['ttl']); } - array_walk_recursive($row,'sanitize_array'); return $row; } else { diff --git a/includes/dbFacile.mysqli.php b/includes/dbFacile.mysqli.php index 70c4651e7c..15a48962cf 100644 --- a/includes/dbFacile.mysqli.php +++ b/includes/dbFacile.mysqli.php @@ -267,7 +267,6 @@ function dbFetchRows($sql, $parameters=array(), $nocache=false) { if ($config['memcached']['enable'] && $nocache === false) { $config['memcached']['resource']->set(hash('sha512',$sql.'|'.serialize($parameters)),$rows,$config['memcached']['ttl']); } - array_walk_recursive($rows,'sanitize_array'); return $rows; } @@ -335,7 +334,6 @@ function dbFetchRow($sql=null, $parameters=array(), $nocache=false) { if ($config['memcached']['enable'] && $nocache === false) { $config['memcached']['resource']->set(hash('sha512',$sql.'|'.serialize($parameters)),$row,$config['memcached']['ttl']); } - array_walk_recursive($row,'sanitize_array'); return $row; } else {