From 50b2985a3ebdc5df5af299d587acc0940f193fdb Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 13 May 2015 14:01:48 +0530 Subject: [PATCH] bug Escape database and table names for partition maintenance Signed-off-by: Madhura Jayaratne --- ChangeLog | 1 + libraries/Partition.class.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78eee3c988..d8dd18561f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ phpMyAdmin - ChangeLog - bug #4512 ForceSSL Redirect Check - bug Undefined index collation_connection - bug Error when the reporting server is down +- bug Escape database and table names for partition maintenance 4.4.6.0 (2015-05-07) - bug #4890 webkitStorageInfo and webkitIndexedDB is deprecated diff --git a/libraries/Partition.class.php b/libraries/Partition.class.php index f96285e8c6..92e597148e 100644 --- a/libraries/Partition.class.php +++ b/libraries/Partition.class.php @@ -30,8 +30,8 @@ class PMA_Partition if (PMA_Partition::havePartitioning()) { return $GLOBALS['dbi']->fetchResult( "SELECT `PARTITION_NAME` FROM `information_schema`.`PARTITIONS`" - . " WHERE `TABLE_SCHEMA` = '" . $db - . "' AND `TABLE_NAME` = '" . $table . "'" + . " WHERE `TABLE_SCHEMA` = '" . PMA_Util::sqlAddSlashes($db) + . "' AND `TABLE_NAME` = '" . PMA_Util::sqlAddSlashes($table) . "'" ); } else { return array();