diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-09-28 16:35:11 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-09-29 10:33:49 +0300 |
commit | fb966b49b5d17b43b163da82ac4901dd054b23cd (patch) | |
tree | 1223eedc8cde1b692aeb2457a2a8977fc6ead8bf /lib | |
parent | f121adedc133deba508cfebf245c832a901e0993 (diff) |
Do not match sharees on an empty email address
When asking for sharees we compare not only UID and displayname but also
the email address. And if that matches we return the sharee as an exact
match. This logic had a flaw as in that it also matched the empty string
to users with no email address.
This is most noticeable when you disable sharee enumeration and open the
ownership transfer dialog. It suggested other users of the instance
before. This has stopped now.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Collaboration/Collaborators/UserPlugin.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index c92f7bb0b6e..1d6e0fc0c06 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -101,9 +101,9 @@ class UserPlugin implements ISearchPlugin { $userEmail = $user->getEMailAddress(); $uid = (string) $uid; if ( - strtolower($uid) === $lowerSearch || + $lowerSearch !== '' && (strtolower($uid) === $lowerSearch || strtolower($userDisplayName) === $lowerSearch || - strtolower($userEmail) === $lowerSearch + strtolower($userEmail) === $lowerSearch) ) { if (strtolower($uid) === $lowerSearch) { $foundUserById = true; |