From 1ae6275be73d65a393aaa6829d4a71e5a1bf0045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 7 Dec 2016 09:33:37 +0100 Subject: [PATCH] Fix wrong parameter to escapeString MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These come from f14cffd Fixes #12786 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/DbSearch.php | 2 +- libraries/navigation/nodes/Node.php | 7 ++----- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2666776b14..7015c423dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ phpMyAdmin - ChangeLog - issue #12757 Fixed creating new user with older MariaDB - issue #12784 Remove ctype installation suggestion - issue #12780 Format button replaces all text with blank spaces +- issue #12786 Fixed database searching 4.6.5.2 (2016-12-05) - issue #12765 Fixed SQL export with newlines diff --git a/libraries/DbSearch.php b/libraries/DbSearch.php index 38f64885ed..ad2b73fee8 100644 --- a/libraries/DbSearch.php +++ b/libraries/DbSearch.php @@ -140,7 +140,7 @@ class DbSearch unset($this->_criteriaColumnName); } else { $this->_criteriaColumnName = $GLOBALS['dbi']->escapeString( - $_REQUEST['criteriaColumnName'], true + $_REQUEST['criteriaColumnName'] ); } } diff --git a/libraries/navigation/nodes/Node.php b/libraries/navigation/nodes/Node.php index 8265f63192..f265fca288 100644 --- a/libraries/navigation/nodes/Node.php +++ b/libraries/navigation/nodes/Node.php @@ -685,7 +685,7 @@ class Node { if (!empty($searchClause)) { $databases = array( - "%" . $GLOBALS['dbi']->escapeString($searchClause, true) . "%", + "%" . $GLOBALS['dbi']->escapeString($searchClause) . "%", ); } elseif (!empty($GLOBALS['cfg']['Server']['only_db'])) { $databases = $GLOBALS['cfg']['Server']['only_db']; @@ -712,10 +712,7 @@ class Node if (!empty($searchClause)) { $whereClause .= "AND " . Util::backquote($columnName) . " LIKE '%"; - $whereClause .= $GLOBALS['dbi']->escapeString( - $searchClause, - true - ); + $whereClause .= $GLOBALS['dbi']->escapeString($searchClause); $whereClause .= "%' "; }