Skip to content
Permalink
Browse files Browse the repository at this point in the history
bug #4612 [security] XSS vulnerability in redirection mechanism
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
nijel authored and madhuracj committed Dec 1, 2014
1 parent e9e3998 commit 9b2479b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,6 +1,9 @@
phpMyAdmin - ChangeLog
======================

4.2.13.1 (not yet released)
- bug #4612 [security] XSS vulnerability in redirection mechanism

4.2.13.0 (2014-11-30)
- bug #4604 Query history not being deleted
- bug #4057 db/table query string parameters no longer work
Expand Down
6 changes: 5 additions & 1 deletion url.php
Expand Up @@ -11,6 +11,10 @@
*/
define('PMA_MINIMUM_COMMON', true);
require_once './libraries/common.inc.php';
/**
* JavaScript escaping.
*/
require_once './libraries/js_escape.lib.php';

if (! PMA_isValid($_GET['url'])
|| ! preg_match('/^https?:\/\/[^\n\r]*$/', $_GET['url'])
Expand All @@ -24,7 +28,7 @@
// external site.
echo "<script type='text/javascript'>
window.onload=function(){
window.location='" . htmlspecialchars($_GET['url']) . "';
window.location='" . PMA_escapeJsString($_GET['url']) . "';
}
</script>";
// Display redirecting msg on screen.
Expand Down

0 comments on commit 9b2479b

Please sign in to comment.