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

CorePluginsAdmin should accept superuser authtoken even if no user is logged in #3413

Closed
anonymous-matomo-user opened this issue Oct 1, 2012 · 7 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@anonymous-matomo-user
Copy link

I think CorePluginsAdmin should accept superuser authtoken even if no user is logged in.

I'm writing a shell script to install and fully configure Piwik and it seems to be impossible to programmatically activate/deactivate plugins issuing the following command:

command php ./index.php' -- 'module=CorePluginsAdmin&action=deactivate&pluginName=Feedback&auth_token=c1c05355fbe3b4c04df07dcdfa306e8b'

It should be possible IMHO. Looking to the source code I see auth_token is compared with the current logged user token .. failing

@mattab
Copy link
Member

mattab commented Oct 3, 2012

This is a security measure to prevent CSRF which would make it trivial to remotely disable all piwik plugins... but one could do a lot anyway like changing user password etc. so it's maybe not necessary and we could move the plugin enable/disable code to a 'super user only' API.

@anonymous-matomo-user
Copy link
Author

It would be very very useful :) Thanks

BTW, donno if it could be an alternative, but it would suffice to have this capability when the script is invoked directly from the cmd line .. no need to do the job via web for me.

@mattab
Copy link
Member

mattab commented Apr 4, 2013

I propose we do this once we have a really good use case. Do you have a good use case?

@anonymous-matomo-user
Copy link
Author

I think my fully automated install and update script is a very good use case .. as told in the original post I can automate everything but plugins couse of this limitation ..

don't you agree?

@mattab
Copy link
Member

mattab commented Apr 4, 2013

I agree it's good use case. Will your tool be public?
Or are you only alone going to use it?

@anonymous-matomo-user
Copy link
Author

No problem to make it public .. I'd be glad if you want to take it somehow and keep it up to date be your self .. In other words I can donate it if you (piwik) would integrate and keep up to date .. it's not perfect I suppose, but it makes a good work .. it's a bash script

@mattab
Copy link
Member

mattab commented Jan 13, 2014

Enabling/disabling plugins require NONCE for security reasons.

@anonymous-matomo-user anonymous-matomo-user added this to the Future releases 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. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants