From 09dec45ffab059f133063b64b2c72c2a5a76d429 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sat, 8 Feb 2014 12:36:08 +0530 Subject: [PATCH 1/2] Remove commented debugging code. Replace tabs with spaces Signed-off-by: Madhura Jayaratne --- url.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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 { From 61338c4859b2a2f1ab01ab728d0a5e9fc205cd2b Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sat, 8 Feb 2014 12:38:37 +0530 Subject: [PATCH 2/2] Remove trailing whitespaces Signed-off-by: Madhura Jayaratne --- libraries/core.lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; }