diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 359fb273e1..b21ea2bf22 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -809,12 +809,12 @@ function PMA_linkURL($url) parse_str($arr["query"], $vars); $query = http_build_query(array("url" => $vars["url"])); $url = './url.php?' . $query; - + return $url; } /** - * Checks whether domain of URL is whitelisted domain or not. + * Checks whether domain of URL is whitelisted domain or not. * Use only for URLs of external sites. * * @param string $url URL of external site. @@ -827,8 +827,8 @@ function PMA_isAllowedDomain($url) $domain = $arr["host"]; $domainWhiteList = array( /* Include current domain */ - $_SERVER['SERVER_NAME'], - /* phpMyAdmin domains */ + $_SERVER['SERVER_NAME'], + /* phpMyAdmin domains */ 'wiki.phpmyadmin.net', 'www.phpMyAdmin.net', 'phpmyadmin.net', 'docs.phpmyadmin.net', /* mysql.com domains */ @@ -843,7 +843,7 @@ function PMA_isAllowedDomain($url) if (in_array($domain, $domainWhiteList)) { return true; } - + return false; } diff --git a/url.php b/url.php index 0e721cd817..764b81cb73 100644 --- a/url.php +++ b/url.php @@ -17,19 +17,17 @@ if (! PMA_isValid($_GET['url']) ) { header('Location: ' . $cfg['PmaAbsoluteUri']); } else { - // header('Location: ' . $_GET['url']); - // domain whitelist check if (PMA_isAllowedDomain($_GET['url'])) { // JavaScript redirection is necessary. Because if header() is used - // then web browser sometimes does not change the HTTP_REFERER - // field and so with old URL as Referer, token also goes to + // then web browser sometimes does not change the HTTP_REFERER + // field and so with old URL as Referer, token also goes to // external site. echo ""; + window.onload=function(){ + window.location='" . $_GET['url'] . "'; + } + "; // Display redirecting msg on screen. echo __('Taking you to ') . ($_GET['url']); } else {