-
Notifications
You must be signed in to change notification settings - Fork 30
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
EZP-31462: Removed password hash types break login #141
EZP-31462: Removed password hash types break login #141
Conversation
Fixup: Get the default hash type from the password hash service, rather than hardcoding it. NB: It's not at all certain that the final fix will look like this. It may be the wrong place to fix it. |
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be, but I'm not gonna accept this w/o either integration or unit tests.
Fair point. Set as work in progress, and I've asked for Eng help on it. I need to focus on the growing security issue list, and this isn't security. Maybe @kaff will be able to look at this later? 🏃💨 |
cee5500
to
2944284
Compare
2944284
to
9947249
Compare
Co-Authored-By: Paweł Niedzielski <Steveb-p@users.noreply.github.com>
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested successfully.
QA Approved on Ibexa Experience v3.2.4 with diff.
v3.2
+The previous fixes are incomplete. When an invalid hash type is detected, we expire the password and ask the user to enter a new password. But when we save this new password, we don't update the hash type, which means the password isn't saved, and the user ends up in a redirect loop.
However, cache can mask the issue. If you test by manually changing hash type to an invalid one in the db, you have to clear caches before you go through the test steps.
This fix catches when the type is invalid, and sets it to the default type in that case.
DOC: Once fixed, I suggest the relevant doc should mention that you have to upgrade to at least version x for this to work.
https://github.com/ezsystems/developer-documentation/blob/03a7cc0ea04f3e6bf7ebf22a8bea53840123196e/docs/releases/ez_platform_v3.0_deprecations.md#password-hashes
Checklist:
$ composer fix-cs
).@ezsystems/php-dev-team
).