From ca74f480f119a53ef07ca40d2ab28f063cc89ec9 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Thu, 30 Jun 2011 09:59:43 +0200 Subject: [PATCH] Fixed regexp quoting issue in Synchronize code --- ChangeLog | 1 + libraries/server_synchronize.lib.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d0cbb1d51..a8a789820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA 3.3.10.2 (not yet released) - [security] Fixed possible session corruption in swekey authentication - [security] Fixed possible code injection incase session variables are compromised +- [security] Fixed regexp quoting issue in Synchronize code. 3.3.10.1 (2011-05-20) - [security] XSS on Tracking page diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php index 79948b9e8..646ef2591 100644 --- a/libraries/server_synchronize.lib.php +++ b/libraries/server_synchronize.lib.php @@ -624,7 +624,7 @@ function PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, &$uncomm $Create_Query = PMA_DBI_fetch_value("SHOW CREATE TABLE " . PMA_backquote($src_db) . '.' . PMA_backquote($uncommon_tables[$table_index]), 0, 1, $src_link); // Replace the src table name with a `dbname`.`tablename` - $Create_Table_Query = preg_replace('/' . PMA_backquote($uncommon_tables[$table_index]) . '/', + $Create_Table_Query = preg_replace('/' . preg_quote(PMA_backquote($uncommon_tables[$table_index]), '/') . '/', PMA_backquote($trg_db) . '.' .PMA_backquote($uncommon_tables[$table_index]), $Create_Query, $limit = 1