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

[stable24] Compare lowercase email when updating from ldap #35946

Merged
merged 1 commit into from
Jan 19, 2023

Commits on Jan 2, 2023

  1. I dug into it again, and the issue is much simpler than I previously …

    …though.
    
    - LDAP has an email address with capital letters
    - NC store this address in lower case
    - When the user logs in, we compare the [stored email with the new lower case email](https://github.com/nextcloud/server/blob/master/lib/private/AllConfig.php#L259-L261) before storing it. Here, both email will be the same, so we won't store the new email address with upper case letters. Which is what we want.
    - We then [compare emails as they are before triggering an event](https://github.com/nextcloud/server/blob/master/lib/private/User/User.php#L202-L204), they won't match, so the user will receive an email signaling an email change every time he logs in.
    
    The fix is to compare the old email with the new lower case email before sending the event.
    
    Signed-off-by: Louis Chemineau <louis@chmn.me>
    artonge authored and backportbot-nextcloud[bot] committed Jan 2, 2023
    Configuration menu
    Copy the full SHA
    34a93a0 View commit details
    Browse the repository at this point in the history