Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin homepage link redirect fails #1711

Closed
anonymous-matomo-user opened this issue Sep 20, 2010 · 6 comments
Closed

Plugin homepage link redirect fails #1711

anonymous-matomo-user opened this issue Sep 20, 2010 · 6 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

When you specify a 'homepage' in getInformation() that is an absolute link to a website other than (qa|demo|dev|forum)?.piwik.org or http://clearcode.cc/, the redirect fails. This is because the homepage URL is passed to misc/redirectToUrl.php which contains the following code:

#!php
$url = htmlentities($_GET['url']);
if(!preg_match('~^http://(qa\.|demo\.|dev\.|forum\.)?piwik.org(/|$)~', $url)
&& !in_array($url, array(
    'http://clearcode.cc/',
))) { die; }

This makes it impossible to link to a non-piwik website.

@robocoder
Copy link
Contributor

We implemented a whitelist because people reported this as an xss vulnerability.

When you submit your plugin, include a request to whitelist your url.

@anonymous-matomo-user
Copy link
Author

I see - thanks for the tip.

@mattab
Copy link
Member

mattab commented Nov 16, 2010

We should simply link to the author website link rather than pass it through the redirect script (in this case).

@robocoder
Copy link
Contributor

matt: It's no longer necessary to submit a request to whitelist a URL. The Proxy module automatically whitelists the URLs supplied by plugins' getInformation().

@robocoder
Copy link
Contributor

(In [3323]) refs #1711, refs #1014 - move plugin-specific logic out of Url.php to Proxy module; simplify code; re-org related tests

@mattab
Copy link
Member

mattab commented Nov 25, 2010

(In [3360]) Refs #1711 - simplifying code: now homepage/license links link directly to the URL, and would expose referer. This is not an issue as, a plugin could anyway obtain a lot more information about the server anyway. In code, all URLs using Proxy&action=redirect are Piwik.org URLs.

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 1.1 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

3 participants