Skip to content

Commit f986a3c

Browse files
author
Marius Cramer
committed
- another regexp fix for sql injection detection
1 parent fc0a1c8 commit f986a3c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interface/lib/classes/db_mysql.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ private function securityScan($string) {
138138
$chars = array(';', '#', '/*', '*/', '--', ' UNION ', '\\\'', '\\"');
139139

140140
$string = str_replace('\\\\', '', $string);
141-
$string = preg_replace('/(^|[^\\\])([\'"])(.*?[^\\\]?)\\2/is', '$1', $string);
141+
$string = preg_replace('/(^|[^\\\])([\'"])\\2/is', '$1', $string);
142+
$string = preg_replace('/(^|[^\\\])([\'"])(.*?[^\\\])\\2/is', '$1', $string);
142143
$ok = true;
143144

144145
if(substr_count($string, "`") % 2 != 0 || substr_count($string, "'") % 2 != 0 || substr_count($string, '"') % 2 != 0) {

0 commit comments

Comments
 (0)