From ea50288fcad8a99d6cf67eb1ff9ccd7f622df486 Mon Sep 17 00:00:00 2001 From: "Ann + J.M" Date: Sat, 29 Mar 2014 21:34:08 +0100 Subject: [PATCH 1/2] Fix #4345 Privileges editor shows databases with underscore backslash-escaped Signed-off-by: Ann + J.M --- libraries/server_privileges.lib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index aa72a282fc..a0eaae9092 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -2485,7 +2485,7 @@ function PMA_getLinkToDbAndTable($url_dbname, $dbname, $tablename) ) ) . '">' - . htmlspecialchars($dbname) . ': ' + . htmlspecialchars(stripslashes($dbname)) . ': ' . PMA_Util::getTitleForTarget( $GLOBALS['cfg']['DefaultTabDatabase'] ) @@ -2640,7 +2640,7 @@ function PMA_getHtmlForDisplayUserRightsInRows($db_rights, $dbname, $html_output .= '' . "\n" . '' . htmlspecialchars( - (! strlen($dbname)) ? $row['Db'] : $row['Table_name'] + (! strlen($dbname)) ? stripslashes($row['Db']) : $row['Table_name'] ) . '' . "\n" . '' . "\n" @@ -2742,7 +2742,7 @@ function PMA_getTableForDisplayAllTableSpecificRights( // table body // get data - // we also want privielgs for this user not in table `db` but in other table + // we also want privileges for this user not in table `db` but in other table $tables = $GLOBALS['dbi']->fetchResult('SHOW TABLES FROM `mysql`;'); /** @@ -3726,13 +3726,14 @@ function PMA_getHtmlHeaderForDisplayUserProperties( 'tablename' => '', ) ) - . '">' . htmlspecialchars($dbname) + . '">' . htmlspecialchars(stripslashes($dbname)) . ''; $html_output .= ' - ' . __('Table') . ' ' . htmlspecialchars($tablename) . ''; } else { - $html_output .= ' ' . htmlspecialchars($dbname) . ''; + $html_output .= ' ' . htmlspecialchars(stripslashes($dbname)) + . ''; } } else { From c6e450a566c38f96af4a836a40f0ed3971e1b4aa Mon Sep 17 00:00:00 2001 From: "Ann + J.M" Date: Sat, 29 Mar 2014 21:34:27 +0100 Subject: [PATCH 2/2] Add ChangeLog entry for bug #4345 Signed-off-by: Ann + J.M --- ChangeLog | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d53157834..fbe8df4cec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.1.13.0 (not yet released) - bug #4279 CTRL + up or down moves 2 fields - bug #4336 List server css style wrong +- bug #4345 Privileges editor shows databases with underscore backslash-escaped 4.1.12.0 (2014-03-27) - bug #4334 Add event : datepicker won't open @@ -12,7 +13,7 @@ phpMyAdmin - ChangeLog - bug #4326 Cannot find the import plugins which start with uppercase 'I' 4.1.11.0 (2014-03-23) -- bug #4335 reCaptcha problem (4.1.10 regression) +- bug #4335 reCaptcha problem (4.1.10 regression) 4.1.10.0 (2014-03-22) - bug #4301 Grid edit: "SELECT" query is replaced by "UPDATE" query after edit @@ -20,11 +21,11 @@ phpMyAdmin - ChangeLog - bug #4324 Datepicker not showing up on insert page - bug #3991 Problem selecting item in select boxes with the ENTER keystroke in some browsers - bug #4323 QueryWindow ignores CodeMirror -- bug None of the live charts shown on "Status -> Monitor" (Chrome) +- bug None of the live charts shown on "Status -> Monitor" (Chrome) 4.1.9.0 (2014-03-06) - bug #4279 CTRL + up or down moves two fields (part one) -- bug #4294 output as text radio clickable for "OpenDocument Text" export +- bug #4294 output as text radio clickable for "OpenDocument Text" export - bug #4297 DROP DATABASE tick box in export no longer works - bug #4291 Unable to export comments in OpenDocument text format - bug #4299 Deletion even when the user says "No" to the confirmation message @@ -50,7 +51,7 @@ phpMyAdmin - ChangeLog - Fixed altering table to DOUBLE/FLOAT field - bug #4292 Success message and failure message being shown together - bug #4293 opening new tab (using selflink) for import.php based actions - results in error and logout + results in error and logout 4.1.7.0 (2014-02-09) - bug #4245 initial Browse query does not match sorting order