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

API produces wrong URLs #1482

Closed
anonymous-matomo-user opened this issue Jul 16, 2010 · 3 comments
Closed

API produces wrong URLs #1482

anonymous-matomo-user opened this issue Jul 16, 2010 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@anonymous-matomo-user
Copy link

Hi,

I've found a bug trying to integrate Piwik with Django via Python-piwik.

That one calls SitesManager.getJavascriptTag which is defined as
return self::getCurrentScheme().'://'.self::getCurrentHost(). self::getCurrentScriptPath();

However, on my server, getCurrentHost is sub.domain.tld and getCurrentScriptPath is /http://sub.domain.tld/piwik/ (with both those trailing slashes). So getJavascriptTag produces
http://sub.domain.tld/http://sub.domain.tld/piwik/
which obviously does not work.

This breaks the API.

Should be easy to fix
Greets

@anonymous-matomo-user
Copy link
Author

Additional information:
$_SERVER['REQUEST_URI'] is used and it contains
http://sub.domain.tld/piwik/?token_auth=[TOKENTOKENTOKEN]&idSite=1&method=SitesManager.getJavascriptTag&module=API&format=json

@robocoder
Copy link
Contributor

fixed in r2389 for #1451

@anonymous-matomo-user
Copy link
Author

That was quite fast.

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. duplicate For issues that already existed in our issue tracker and were reported previously. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants