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

UserManager updateUser fails when uppercase lowercase spelling in email address changed (e.g. LDAP plugin) #14939

Closed
peterbo opened this issue Oct 2, 2019 · 4 comments · Fixed by #14950
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@peterbo
Copy link
Contributor

peterbo commented Oct 2, 2019

When uppercase/lowercase spelling changed for the email address (e.g. synchronized via LDAP), UserManager updateUser method fails (and therefore, in case of LDAP, auth fails).
This is because the comparison of old/new email address is case sensitive, but the duplicate check for that email address in the database is case insensitive. That leads to an exception.

@tsteur tsteur added Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. Bug For errors / faults / flaws / inconsistencies etc. labels Oct 2, 2019
@tsteur
Copy link
Member

tsteur commented Oct 2, 2019

@peterbo do you know where exactly in the UserManager updateUser method the check needs to be case insensitive? Not sure how the API is called there. I suppose you mean https://github.com/matomo-org/matomo/blob/3.12.0-b4/plugins/UsersManager/API.php#L926-L928 ?

@peterbo
Copy link
Contributor Author

peterbo commented Oct 3, 2019

@tsteur right, that's the spot where the check should be case insensitive (e.g. strcasecmp or strtolower on both values?)

@tsteur
Copy link
Member

tsteur commented Oct 3, 2019

Created PR 👍

@tsteur tsteur self-assigned this Oct 3, 2019
peterbo added a commit to peterbo/matomo that referenced this issue Oct 3, 2019
@peterbo
Copy link
Contributor Author

peterbo commented Oct 3, 2019

@tsteur oops, sorry, I was late to the party! Just ignore my commit. Thanks for tackling the issue, Thomas!

peterbo added a commit to peterbo/matomo that referenced this issue Oct 3, 2019
@mattab mattab added this to the 3.12.0 milestone Oct 27, 2019
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. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants