-
-
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
Problem with password recovery functionality when Piwik has no sites defined #7073
Comments
Are you sure it is affected by this line? It doesn't do anything with sites. I tried to reproduce without a site but couldn't. Can you maybe describe step by step? |
I can reproduce it after clicking on the activation link |
Problem is after clicking on the activation link it wants to redirect to another URL here: https://github.com/piwik/piwik/blob/master/plugins/Login/Controller.php#L282 There it wants to create a URL to redirect but as no website is defined and it fails here: https://github.com/piwik/piwik/blob/master/core/Plugin/Menu.php#L191 In this case |
…ccess directly to prevent an error in case no website is defined
@diosmosis I committed a patch see f1ce174 I'm not sure with the latest login refactoring that was happening a couple of months ago. I presume this code should work as other Login plugins are supposed to extend the Login controller? And if they don't extend it, the change is still ok as it would never go into this method of the original Login controller (instead into the |
@tsteur Login plugins have to extend from the controller as a practical reality, but I don't think they have to (or should). Ideally, the Login controller should be always activated, and other plugins should provide Auth implementations, PasswordResetters, etc. I don't think there are many plugins in the marketplace, though, so maybe we can do a quick check and see if it won't break anything. |
True, they should ideally only provide auth implementation. I will have a look at the Marketplace but I can't think of any problem, it should be even better this way as we get rid of the
|
Goal of this ticket is to improve Piwik functionality of password recovery in situation when there are no sites defined. Currently, it is affected by this piece of code https://github.com/piwik/piwik/blob/master/core/Plugin/Controller.php#L850 .
In some edge cases, this can virtually disable Piwik instance if one has forgoten his password, and has all sites deleted.
It is possible that other functionalities can also be affected by this bug.
Maybe this could be a beginning of new big feature, making Piwik independent of any site being present ? This would remove necessity to define site during installation.
The text was updated successfully, but these errors were encountered: