From f02be96750e48859cc63f1f2b64a86a9202178b4 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 22 Sep 2014 07:25:20 -0400
Subject: [PATCH] Fixed a error in OS detection code for CentOS.

---
 interface/lib/classes/db_mysql.inc.php |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index 6609ec9..bcf1b00 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -138,7 +138,8 @@
 				$chars = array(';', '#', '/*', '*/', '--', ' UNION ', '\\\'', '\\"');
 		
 				$string = str_replace('\\\\', '', $string);
-				$string = preg_replace('/(^|[^\\\])([\'"])(.*?[^\\\]?)\\2/is', '$1', $string);
+				$string = preg_replace('/(^|[^\\\])([\'"])\\2/is', '$1', $string);
+				$string = preg_replace('/(^|[^\\\])([\'"])(.*?[^\\\])\\2/is', '$1', $string);
 				$ok = true;
 
 				if(substr_count($string, "`") % 2 != 0 || substr_count($string, "'") % 2 != 0 || substr_count($string, '"') % 2 != 0) {

--
Gitblit v1.9.1