From 081843aa5c0152c1c6ec8d0cb69f4041c8ea8683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 1 Dec 2016 11:02:04 +0100 Subject: [PATCH 1/2] Fixed SQL export with newlines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove manual escaping where we do proper escaping through MySQL extension. Fixes #12765 Signed-off-by: Michal Čihař --- ChangeLog | 3 +++ libraries/plugins/export/ExportSql.php | 10 +--------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index eefc227600..29de1421aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ phpMyAdmin - ChangeLog ====================== +4.6.5.2 (2016-12-05) +- issue #12765 Fixed SQL export with newlines + 4.6.5.1 (2016-11-25) - issue #12735 Incorrect parameters to escapeString in Node.php - issue #12734 Fix PHP error when mbstring is not installed diff --git a/libraries/plugins/export/ExportSql.php b/libraries/plugins/export/ExportSql.php index df13901294..b44ddc07c3 100644 --- a/libraries/plugins/export/ExportSql.php +++ b/libraries/plugins/export/ExportSql.php @@ -2317,8 +2317,6 @@ class ExportSql extends ExportPlugin } //\x08\\x09, not required - $search = array("\x00", "\x0a", "\x0d", "\x1a"); - $replace = array('\0', '\n', '\r', '\Z'); $current_row = 0; $query_size = 0; if (($GLOBALS['sql_insert_syntax'] == 'extended' @@ -2411,13 +2409,7 @@ class ExportSql extends ExportPlugin } else { // something else -> treat as a string $values[] = '\'' - . $GLOBALS['dbi']->escapeString( - str_replace( - $search, - $replace, - $row[$j] - ) - ) + . $GLOBALS['dbi']->escapeString($row[$j]) . '\''; } // end if } // end for From ce2208635f5a1c69a90a871ea3ec7cdd96333022 Mon Sep 17 00:00:00 2001 From: Isaac Bennetch Date: Mon, 5 Dec 2016 16:11:50 -0500 Subject: [PATCH 2/2] Update for release 4.6.5.2 Signed-off-by: Isaac Bennetch --- README | 2 +- doc/conf.py | 2 +- libraries/Config.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 0a89d47dc2..0101eb899b 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ phpMyAdmin - Readme =================== -Version 4.6.5.1 +Version 4.6.5.2 A web interface for MySQL and MariaDB. diff --git a/doc/conf.py b/doc/conf.py index 99d29eabda..a6eb890ed1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -51,7 +51,7 @@ copyright = u'2012 - 2016, The phpMyAdmin devel team' # built documents. # # The short X.Y version. -version = '4.6.5.1' +version = '4.6.5.2' # The full version, including alpha/beta/rc tags. release = version diff --git a/libraries/Config.php b/libraries/Config.php index a4e22c37d2..bfdc6c6ef0 100644 --- a/libraries/Config.php +++ b/libraries/Config.php @@ -101,7 +101,7 @@ class Config */ public function checkSystem() { - $this->set('PMA_VERSION', '4.6.5.1'); + $this->set('PMA_VERSION', '4.6.5.2'); /** * @deprecated */