Skip to content

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

Open
DerDreschner wants to merge 1 commit into
masterfrom
fix/respect-full-match-mail-in-edge-cases
Open

fix(UserPlugin): Don't return mail matches on user id search#61981
DerDreschner wants to merge 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
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 70e10a5 to 4b50b87 Compare July 12, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

1 participant