From 16c4ca0daa9648257d5a2548e4035d2988805fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 26 Jul 2016 16:47:01 +0200 Subject: [PATCH] Properly escape configuration parameters when rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- db_central_columns.php | 2 +- libraries/DisplayResults.php | 4 ++-- libraries/browse_foreigners.lib.php | 2 +- libraries/controllers/server/ServerBinlogController.php | 4 ++-- libraries/plugins/AuthenticationPlugin.php | 2 +- libraries/plugins/auth/AuthenticationCookie.php | 2 +- templates/columns_definitions/column_name.phtml | 4 ++-- templates/table/search/options.phtml | 4 ++-- templates/table/search/options_zoom.phtml | 6 +++--- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/db_central_columns.php b/db_central_columns.php index 0b1294f812..a1cd31ba7d 100644 --- a/db_central_columns.php +++ b/db_central_columns.php @@ -64,7 +64,7 @@ $scripts->addFile('db_central_columns.js'); $cfgCentralColumns = PMA_centralColumnsGetParams(); $pmadb = $cfgCentralColumns['db']; $pmatable = $cfgCentralColumns['table']; -$max_rows = $GLOBALS['cfg']['MaxRows']; +$max_rows = intval($GLOBALS['cfg']['MaxRows']); if (isset($_REQUEST['edit_central_columns_page'])) { $selected_fld = $_REQUEST['selected_fld']; diff --git a/libraries/DisplayResults.php b/libraries/DisplayResults.php index a24ae288e4..d398b3e81d 100644 --- a/libraries/DisplayResults.php +++ b/libraries/DisplayResults.php @@ -1023,7 +1023,7 @@ class DisplayResults . '' . '' + . (! $showing_all ? 'all' : intval($GLOBALS['cfg']['MaxRows'])) . '" />' . '' . 'getError(); diff --git a/libraries/plugins/auth/AuthenticationCookie.php b/libraries/plugins/auth/AuthenticationCookie.php index c77dc0f238..0cb425ae95 100644 --- a/libraries/plugins/auth/AuthenticationCookie.php +++ b/libraries/plugins/auth/AuthenticationCookie.php @@ -207,7 +207,7 @@ class AuthenticationCookie extends AuthenticationPlugin echo ''; echo '
'; + , htmlspecialchars($GLOBALS['cfg']['CaptchaLoginPublicKey']) , '">'; } echo ' diff --git a/templates/columns_definitions/column_name.phtml b/templates/columns_definitions/column_name.phtml index 6d64b2effc..9659679f8b 100644 --- a/templates/columns_definitions/column_name.phtml +++ b/templates/columns_definitions/column_name.phtml @@ -37,10 +37,10 @@ if (empty($title)) { ): ?>

-

- \ No newline at end of file + diff --git a/templates/table/search/options.phtml b/templates/table/search/options.phtml index f673459f64..89908c0e24 100644 --- a/templates/table/search/options.phtml +++ b/templates/table/search/options.phtml @@ -47,7 +47,7 @@ name="session_max_rows" required="required" min="1" - value="" + value="" class="textfield" /> @@ -75,4 +75,4 @@ ); ?> -
\ No newline at end of file +
diff --git a/templates/table/search/options_zoom.phtml b/templates/table/search/options_zoom.phtml index 4304e78050..d288db040d 100644 --- a/templates/table/search/options_zoom.phtml +++ b/templates/table/search/options_zoom.phtml @@ -41,8 +41,8 @@ id="maxRowPlotLimit" required="required" value="" /> + ? intval($_POST['maxPlotLimit']) + : intval($GLOBALS['cfg']['maxRowPlotLimit'])); ?>" /> - \ No newline at end of file +