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

TrackerConfig altering supplied url #11688

Closed
Rockvole opened this issue May 11, 2017 · 3 comments
Closed

TrackerConfig altering supplied url #11688

Rockvole opened this issue May 11, 2017 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@Rockvole
Copy link

I configured my server for web and android analytics like this :
/js/p.php is a symbolic link to /piwik/piwik.php
/js/p.js is a symbolic link to /piwik/p.js
The piwik directory is restricted access to my ip only.

I did this since I noticed that ublock origin blocks any url with the word "piwik" in it so my requests were not getting through.
It seems that TrackerConfig is altering my supplied /js/p.php to /js/p.php/piwik.php

@mattab
Copy link
Member

mattab commented Jun 21, 2017

It seems that TrackerConfig is altering my supplied /js/p.php to /js/p.php/piwik.php

What do you mean by this?

@mattab mattab closed this as completed Jun 21, 2017
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jun 21, 2017
@Rockvole
Copy link
Author

From TrackerConfig.java :

public TrackerConfig(@NonNull String apiUrl, int siteId, String trackerName) {
        try {
            if (apiUrl.endsWith("piwik.php") || apiUrl.endsWith("piwik-proxy.php")) {
                mApiUrl = new URL(apiUrl);
            } else {
                if (!apiUrl.endsWith("/")) apiUrl += "/";
                mApiUrl = new URL(apiUrl + "piwik.php");
            }
        } catch (MalformedURLException e) { throw new RuntimeException(e); }
        mSiteId = siteId;
        mTrackerName = trackerName;
    }

The code is forcing all url's to contain piwik, when any url's containing piwik will be blocked by ublock origin.

@mattab
Copy link
Member

mattab commented Jun 21, 2017

@Rockvole please report the issue in the Java SDK issue tracker here: https://github.com/piwik/piwik-java-tracker/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants