-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Security improvment: put the optout function in another file #11039
Comments
This had bugged us also 3 years ago and what we did was only permit 2 files from being seen from the internet: piwik.js and piwik.php. All others are only visible from our infrastructure or with a VPN connection. |
This was my first idea, too. But unfortunately the optout function is called by user and done by index.php.
|
How can I secure my piwik-Directory when I installed Piwik like: User from outside should be tracked and use the optout-function. |
Therefore I need to know what kind of system, network and web server you have. What IP is your Intrant? |
It's an Apache-Webserver (linux-System) and my Intranet-IP-Range begins with 172.25.xx.xx |
Please try this: #Internet <--|--> [piwik webserver: www.mydomain.de/piwik/]
|
now please test: https://www.mydomain.com/piwik/optout.php?idsite=1 and from inside and outside: |
Thanks for the suggestion, but we won't put the opt-out in a different file. |
@bohnelang Adding a separate php file which includes the index.php is relatively easy. From there, you can deny accessing the index.php using a .htaccess file . |
Thanks - Looks good! |
Piwik should strictly differ between (tracking) requests from users and admin requests from staff.
At the moment the optout function is done by index.php that normally handle admin/staff requests. Thus it is hard to make the login-page safe. (Every web admin knows, that login pages have daily brute force attacks by scripts from Internet :-/)
At the moment I am using a work-around: We have this situation
#Internet <--|--> [head www server: www.mydomain.de] <-----> [piwik webserver: piwik.mydomain.de]
Staff can directly access Piwik by http://piwik.mydomain.de/piwik/
Users call Piwik (files) by http://www.mydomain.de/piwik/
I add some Apache Rewrite rules on the head webserver to avoid login attacks from Internet:
Greetings - Andreas
The text was updated successfully, but these errors were encountered: