diff --git a/db_printview.php b/db_printview.php index 3b02b86ceb..e25341128f 100644 --- a/db_printview.php +++ b/db_printview.php @@ -53,7 +53,7 @@ if ($cfg['SkipLockedTables'] == true) { if ($result != false && PMA_DBI_num_rows($result) > 0) { while ($tmp = PMA_DBI_fetch_row($result)) { if (! isset($sot_cache[$tmp[0]])) { - $sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($tmp[0]) . '\';'); + $sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($tmp[0], true) . '\';'); $sts_tmp = PMA_DBI_fetch_assoc($sts_result); $tables[] = $sts_tmp; } else { // table in use diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php index 9d6dcf6697..eebad231bd 100644 --- a/libraries/db_info.inc.php +++ b/libraries/db_info.inc.php @@ -130,7 +130,7 @@ if (true === $cfg['SkipLockedTables']) { if (! isset($sot_cache[$tmp[0]])) { $sts_result = PMA_DBI_query( 'SHOW TABLE STATUS FROM ' . PMA_backquote($db) - . ' LIKE \'' . PMA_sqlAddSlashes($tmp[0]) . '\';'); + . ' LIKE \'' . PMA_sqlAddSlashes($tmp[0], true) . '\';'); $sts_tmp = PMA_DBI_fetch_assoc($sts_result); PMA_DBI_free_result($sts_result); unset($sts_result); diff --git a/libraries/export/sql.php b/libraries/export/sql.php index 13ef94a965..3b0d968c38 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -690,7 +690,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a $new_crlf = $crlf; // need to use PMA_DBI_QUERY_STORE with PMA_DBI_num_rows() in mysqli - $result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($table) . '\'', null, PMA_DBI_QUERY_STORE); + $result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($table, true) . '\'', null, PMA_DBI_QUERY_STORE); if ($result != false) { if (PMA_DBI_num_rows($result) > 0) { $tmpres = PMA_DBI_fetch_assoc($result); diff --git a/server_privileges.php b/server_privileges.php index b08ffa965a..7cd802f232 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -166,8 +166,8 @@ function PMA_RangeOfUsers($initial = '') // strtolower() is used because the User field // might be BINARY, so LIKE would be case sensitive if (!empty($initial)) { - $ret = " WHERE `User` LIKE '" . PMA_sqlAddSlashes($initial) . "%'" - . " OR `User` LIKE '" . PMA_sqlAddSlashes(strtolower($initial)) . "%'"; + $ret = " WHERE `User` LIKE '" . PMA_sqlAddSlashes($initial, true) . "%'" + . " OR `User` LIKE '" . PMA_sqlAddSlashes(strtolower($initial), true) . "%'"; } else { $ret = ''; } @@ -1888,7 +1888,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs $user_host_condition .= ' AND `Db`' - .' LIKE \'' . PMA_sqlAddSlashes($dbname) . "'"; + .' LIKE \'' . PMA_sqlAddSlashes($dbname, true) . "'"; $tables_to_search_for_users = array( 'columns_priv', diff --git a/tbl_create.php b/tbl_create.php index 28ecb64c96..e3e743b953 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -231,7 +231,7 @@ if (isset($_REQUEST['do_save_data'])) { $is_show_stats = $cfg['ShowStats']; $tbl_stats_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' - . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($table) . '\';'); + . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddSlashes($table, true) . '\';'); $tbl_stats = PMA_DBI_fetch_assoc($tbl_stats_result); PMA_DBI_free_result($tbl_stats_result); unset($tbl_stats_result);