Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaseebeqx <com.eq.haseeb@gmail.com>2015-09-06 14:06:27 +0300
committerhaseebeqx <com.eq.haseeb@gmail.com>2015-09-06 14:06:27 +0300
commit92775c02efaae245b27359a3cffceb96bd878640 (patch)
treeffdc83b60e180b6ed12a6aa04e2eef12cd61ffc4 /plugins/Proxy
parent792872645dcd8608542530d5d032d862606c33ed (diff)
code rearrange
rearranged code which will fix issue 8693
Diffstat (limited to 'plugins/Proxy')
-rw-r--r--plugins/Proxy/Controller.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php
index bfc44f421f..a55ea0cc24 100644
--- a/plugins/Proxy/Controller.php
+++ b/plugins/Proxy/Controller.php
@@ -78,7 +78,9 @@ class Controller extends \Piwik\Plugin\Controller
public function redirect()
{
$url = Common::getRequestVar('url', '', 'string', $_GET);
-
+ if (!UrlHelper::isLookLikeUrl($url)) {
+ die('Please check the &url= parameter: it should to be a valid URL');
+ }
// validate referrer
$referrer = Url::getReferrer();
if (empty($referrer) || !Url::isLocalUrl($referrer)) {
@@ -93,9 +95,6 @@ class Controller extends \Piwik\Plugin\Controller
if (!self::isPiwikUrl($url)) {
Piwik::checkUserHasSomeViewAccess();
}
- if (!UrlHelper::isLookLikeUrl($url)) {
- die('Please check the &url= parameter: it should to be a valid URL');
- }
Common::sendHeader('Content-Type: text/html; charset=utf-8');
echo '<html><head><meta http-equiv="refresh" content="0;url=' . $url . '" /></head></html>';