Merge pull request #23090 from nextcloud/backport/23074/stable19

[stable19] Do not match sharees on an empty email address
This commit is contained in:
Roeland Jago Douma 2020-10-01 09:01:08 +02:00 committed by GitHub
commit 12abb5d2d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -113,9 +113,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;