-
Notifications
You must be signed in to change notification settings - Fork 241
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-29703: Legacy LDAP users cause error message on login #1394
Conversation
As I think we did the password hash things on 2017.xx release, you may rebase this for 2017.12 branch |
@glye change base branch here first, then force push. So Travis gets right base branch to merge into and test for when it is triggered. PS: remember to pull in changes on 2017.12 before rebasing btw, added commit there to enable Travis there 20-30min ago. |
2f5a4c7
to
aeaca6a
Compare
|
aeaca6a
to
eb74391
Compare
Update to fix textfile handler test error. |
@andrerom Ok now that tests are passing? |
Kind of, but I'm also a bit unsure if the code in createHash is correct or not, does it really enter that code path when ldap is correctly configured? if not, maybe we should rather fail here as it like @gggeek points out feel wrong that we silently accept. |
eb74391
to
40e3449
Compare
@andrerom @gggeek Rewrite after the release of security advisory http://share.ez.no/community-project/security-advisories/ezsa-2018-005-passwordless-login-for-ldap-users
|
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.
There are some cases in ldap which could be changed to use PASSWORD_HASH_EMPTY now.
|
@gggeek I guess you're busy these days, but if you can take a look, the code is more like what you wanted now. |
Sent to QA. |
Users created by the LDAP login handler have password_hash_type = 0 and password_hash is empty string. On login the standard login handler runs first. It currently doesn't recognise these users and logs an error:
Password hash type ID '0' is not recognized. Defaulting to eZUser::DEFAULT_PASSWORD_HASH.
We should accept this case without errors.Resolved by adding new type
eZUser::PASSWORD_HASH_EMPTY = 0
and by not runningcreateHash()
for this hash type. Log error if it still happens.