The branch, master has been updated via 626d6d855711e36a95a36dadbca7d12ab6bf2c4c (commit) from b85821f944f4beb25f43a8084a6cca8b5e90d3f2 (commit)
- Log ----------------------------------------------------------------- commit 626d6d855711e36a95a36dadbca7d12ab6bf2c4c Author: Marc Delisle marc@infomarc.info Date: Thu Apr 21 09:23:14 2011 -0400
bug #3134495 [synchronization] Data containing single quotes prevents sync
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 2 ++ libraries/server_synchronize.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 2f0c84f..a850c2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -151,6 +151,8 @@ - bug #3208723 [import] Fix import of utf-8 XML files. - bug #3039384 [auth] Force signon auth on signon URL change. - bug #3168733 [core] Synchronization does not honor AllowArbitraryServer +- bug #3134495 [synchronization] Data containing single quotes prevents sync, + thanks to jviewer
3.3.11.0 (not yet released)
diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php index c7d8121..ba6f813 100644 --- a/libraries/server_synchronize.lib.php +++ b/libraries/server_synchronize.lib.php @@ -571,11 +571,11 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link, } $insert_query .= ") VALUES("; if (sizeof($table_fields[$matching_table_index]) == 1) { - $insert_query .= "'" . $result[0] . "'"; + $insert_query .= "'" . PMA_sqlAddslashes($result[0]) . "'"; } else { for ($field_index = 0; $field_index < sizeof($table_fields[$matching_table_index]); $field_index++) { if (isset($result[0][$table_fields[$matching_table_index][$field_index]])) { - $insert_query .= "'" . $result[0][$table_fields[$matching_table_index][$field_index]] . "'"; + $insert_query .= "'" . PMA_sqlAddslashes($result[0][$table_fields[$matching_table_index][$field_index]]) . "'"; } else { $insert_query .= "'NULL'"; }
hooks/post-receive