diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | libraries/classes/Common.php | 7 |
2 files changed, 6 insertions, 2 deletions
@@ -16,6 +16,7 @@ phpMyAdmin - ChangeLog - issue #17121 Fix password_hash function incorrectly adding single quotes to password before hashing - issue #17586 Fix statistics not showing for empty databases - issue #17592 Clicking on the New index link on the sidebar does not throw an error anymore +- issue #17584 It's now possible to browse a database that includes two % in its name 5.2.0 (2022-05-10) - issue #16521 Upgrade Bootstrap to version 5 diff --git a/libraries/classes/Common.php b/libraries/classes/Common.php index ec06fcf017..635dc69c33 100644 --- a/libraries/classes/Common.php +++ b/libraries/classes/Common.php @@ -39,6 +39,7 @@ use function mb_strrpos; use function mb_substr; use function register_shutdown_function; use function session_id; +use function str_replace; use function strlen; use function trigger_error; use function urldecode; @@ -526,8 +527,10 @@ final class Common $urlParams['db'] = $db; $urlParams['table'] = $table; - $containerBuilder->setParameter('db', $db); - $containerBuilder->setParameter('table', $table); + // If some parameter value includes the % character, you need to escape it by adding + // another % so Symfony doesn't consider it a reference to a parameter name. + $containerBuilder->setParameter('db', str_replace('%', '%%', $db)); + $containerBuilder->setParameter('table', str_replace('%', '%%', $table)); $containerBuilder->setParameter('url_params', $urlParams); } |