diff --git a/ChangeLog b/ChangeLog index 425bf128f4..84a0abde67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -67,7 +67,7 @@ phpMyAdmin - ChangeLog - bug #4391 Upgraded to 4.2.0, insanely slow now + rfe #1537 PHP OpenSSL support for cookie encryption/decryption -4.2.12.0 (not yet released) +4.2.12.0 (2014-11-20) - bug #4574 Blank/white page when JavaScript disabled - bug #4577 Multi row actions cause full page reloads - bug ReferenceError: targeturl is not defined @@ -80,6 +80,13 @@ phpMyAdmin - ChangeLog - bug #4602 Exporting selected rows exports all rows of the query - bug #4444 No insert statement produced in SQL export for queries with alias - bug #4603 Field disabled when internal relations used +- bug #4596 [security] XSS through exception stack +- bug #4595 [security] Path traversal can lead to leakage of line count +- bug #4578 [security] XSS vulnerability in table print view +- bug #4579 [security] XSS vulnerability in zoom search page +- bug #4594 [security] Path traversal in file inclusion of GIS factory +- bug #4598 [security] XSS in multi submit +- bug #4597 [security] XSS through pma_fontsize cookie 4.2.11.0 (2014-10-31) - bug ReferenceError: Table_onover is not defined diff --git a/libraries/Config.class.php b/libraries/Config.class.php index e59c94eaf7..cbbb79b143 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -1770,7 +1770,7 @@ class PMA_Config // for the case when there is no config file (this is supported) if (empty($current_size)) { if (isset($_COOKIE['pma_fontsize'])) { - $current_size = $_COOKIE['pma_fontsize']; + $current_size = htmlspecialchars($_COOKIE['pma_fontsize']); } else { $current_size = '82%'; } diff --git a/libraries/Theme.class.php b/libraries/Theme.class.php index a47b3b9e21..c01b1229da 100644 --- a/libraries/Theme.class.php +++ b/libraries/Theme.class.php @@ -434,7 +434,7 @@ class PMA_Theme return $fs; } if (isset($_COOKIE['pma_fontsize'])) { - return $_COOKIE['pma_fontsize']; + return htmlspecialchars($_COOKIE['pma_fontsize']); } return '82%'; } diff --git a/libraries/error_report.lib.php b/libraries/error_report.lib.php index 4674aed9c3..7e028813c3 100644 --- a/libraries/error_report.lib.php +++ b/libraries/error_report.lib.php @@ -237,6 +237,19 @@ function PMA_countLines($filename) return $LINE_COUNT[$filename]; } + // ensure that the file is inside the phpMyAdmin folder + $depath = 1; + foreach (explode('/', $filename) as $part) { + if ($part == '..') { + $depath--; + } elseif ($part != '.') { + $depath++; + } + if ($depath < 0) { + return 0; + } + } + $linecount = 0; $handle = fopen('./js/' . $filename, 'r'); while (!feof($handle)) { @@ -342,7 +355,7 @@ function PMA_getErrorReportForm() . __('You may examine the data in the error report:') . '
' . ''
- . PMA_getPrettyReportData()
+ . htmlspecialchars(PMA_getPrettyReportData())
. '';
$html .= '