From d956922a6195819bf0fa5b12d2b216317f0404e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 26 Sep 2016 13:40:04 +0200 Subject: [PATCH] Remove duplicate code in SQL escaping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #12508 Signed-off-by: Michal Čihař --- ChangeLog | 1 + libraries/Util.php | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e9e43ffc13..591f1db962 100644 --- a/ChangeLog +++ b/ChangeLog @@ -45,6 +45,7 @@ phpMyAdmin - ChangeLog - issue #12321 Assign LIMIT clause only to syntactically correct queries - issue #12461 Can't Execute SQL With Sub-Query Due To "LIMIT 0,25" Inserted At Wrong Place - issue #12511 Clarify documentation on ArbitraryServerRegexp +- issue #12508 Remove duplicate code in SQL escaping 4.6.4 (2016-08-16) - issue [security] Weaknesses with cookie encryption, see PMASA-2016-29 diff --git a/libraries/Util.php b/libraries/Util.php index 2d2c7c77df..91b144765e 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -320,11 +320,7 @@ class Util ); } - if ($php_code) { - $a_string = str_replace('\'', '\\\'', $a_string); - } else { - $a_string = str_replace('\'', '\\\'', $a_string); - } + $a_string = str_replace('\'', '\\\'', $a_string); return $a_string; } // end of the 'sqlAddSlashes()' function