Skip to content

fix(UserPlugin): Don't return mail matches on user id search#61981

Merged
ChristophWurst merged 1 commit into
masterfrom
fix/respect-full-match-mail-in-edge-cases
Jul 14, 2026
Merged

fix(UserPlugin): Don't return mail matches on user id search#61981
ChristophWurst merged 1 commit into
masterfrom
fix/respect-full-match-mail-in-edge-cases

Conversation

@DerDreschner

@DerDreschner DerDreschner commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Since #47686 , the backend search not only returns matches by user ID, but also by their mail address. This is very confusing, as you would expect that to be impossible when the shareapi_restrict_user_enumeration_full_match_email setting is being set to no.

This PR fixes that by checking if the matched user in the user ID code branch was actually a match by user ID and not by something else (like the mail address) as well as adding integration tests to prevent that from happening in the future.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable32

@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@DerDreschner

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@DerDreschner DerDreschner force-pushed the fix/respect-full-match-mail-in-edge-cases branch from ab377f6 to 70e10a5 Compare July 10, 2026 21:13
@DerDreschner DerDreschner enabled auto-merge July 10, 2026 21:14
@DerDreschner DerDreschner force-pushed the fix/respect-full-match-mail-in-edge-cases branch from 70e10a5 to 4b50b87 Compare July 12, 2026 00:59

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

makes sense 👍

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 13, 2026
@DerDreschner DerDreschner force-pushed the fix/respect-full-match-mail-in-edge-cases branch from 4b50b87 to 15ae364 Compare July 14, 2026 07:20
Assisted-by: ClaudeCode:claude-fable-5
Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
@DerDreschner DerDreschner force-pushed the fix/respect-full-match-mail-in-edge-cases branch from 15ae364 to aa6a596 Compare July 14, 2026 12:50
@ChristophWurst ChristophWurst disabled auto-merge July 14, 2026 15:30
@ChristophWurst ChristophWurst merged commit bb61528 into master Jul 14, 2026
211 of 214 checks passed
@ChristophWurst ChristophWurst deleted the fix/respect-full-match-mail-in-edge-cases branch July 14, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish AI assisted feature: sharing regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Sharing UI contradicts actual behavior for exact user lookup by email in Nextcloud 32.0.6

4 participants