From d219d4828659298536c9c7ba117dd28057e8910a Mon Sep 17 00:00:00 2001 From: Marius Cramer <m.cramer@pixcept.de> Date: Mon, 15 Jun 2015 12:56:51 -0400 Subject: [PATCH] - fixed missing web protection removal on backup restore --- interface/lib/classes/db_mysql.inc.php | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index bcf1b00..7331463 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -132,10 +132,15 @@ if($ids_config['sql_scan_enabled'] == 'yes') { + // Remove whitespace + $string = trim($string); + if(substr($string,-1) == ';') $string = substr($string,0,-1); + + // Save original string $string_orig = $string; //echo $string; - $chars = array(';', '#', '/*', '*/', '--', ' UNION ', '\\\'', '\\"'); + $chars = array(';', '#', '/*', '*/', '--', '\\\'', '\\"'); $string = str_replace('\\\\', '', $string); $string = preg_replace('/(^|[^\\\])([\'"])\\2/is', '$1', $string); -- Gitblit v1.9.1