Improvements in URL redirector

- do not concatenate message to allow better translation
- avoid possbile XSS
This commit is contained in:
Michal Čihař 2014-02-11 09:13:28 +01:00
parent 935c2e1406
commit 5e9cf18073

View File

@ -25,11 +25,11 @@ if (! PMA_isValid($_GET['url'])
// external site.
echo "<script type='text/javascript'>
window.onload=function(){
window.location='" . $_GET['url'] . "';
window.location='" . htmlspecialchars($_GET['url']) . "';
}
</script>";
// Display redirecting msg on screen.
echo __('Taking you to ') . ($_GET['url']);
printf(__('Taking you to %s.'), htmlspecialchars($_GET['url']));
} else {
header('Location: ' . $cfg['PmaAbsoluteUri']);
}