Skip to content

Commit 0e41dea

Browse files
author
Marius Cramer
committed
- disallow ` in table names when using ?? placeholder in query
1 parent 587fe4e commit 0e41dea

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
@@ -126,7 +126,8 @@ public function _build_query_string($sQuery = '') {
126126

127127
if($iPos2 !== false && ($iPos === false || $iPos2 <= $iPos)) {
128128
$sTxt = $this->escape($sValue);
129-
129+
130+
$sTxt = str_replace('`', '', $sTxt);
130131
if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt);
131132
else $sTxt = '`' . $sTxt . '`';
132133

0 commit comments

Comments
 (0)