Skip to content

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

Merged
PVince81 merged 1 commit into
stable24from
backport/33813/stable24
Jan 19, 2023
Merged

[stable24] Compare lowercase email when updating from ldap#35946
PVince81 merged 1 commit into
stable24from
backport/33813/stable24

Conversation

@backportbot-nextcloud

Copy link
Copy Markdown

backport of #33813

…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>
@backportbot-nextcloudbackportbot-nextcloudBot added this to the Nextcloud 24.0.10 milestone Jan 2, 2023
@blizzzblizzz added the 4. to release Ready to be released and/or waiting for tests to finish label Jan 17, 2023
@blizzz

Copy link
Copy Markdown
Member

This should be merged next opportunity. It was already reviewed in #33920, but merged too early back then.

@PVince81PVince81 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81
PVince81 merged commit 6170888 into stable24Jan 19, 2023
@PVince81
PVince81 deleted the backport/33813/stable24 branch January 19, 2023 09:13
@blizzzblizzz mentioned this pull request Feb 6, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishbugfeature: emailsfeature: ldapphpPull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@blizzz@PVince81@solracsf@artonge