Skip to content

Commit 12abb5d

Browse files
authored
Merge pull request #23090 from nextcloud/backport/23074/stable19
[stable19] Do not match sharees on an empty email address
2 parents 99e5940 + 1c65d33 commit 12abb5d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/private/Collaboration/Collaborators/UserPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
113113
$userEmail = $user->getEMailAddress();
114114
$uid = (string) $uid;
115115
if (
116-
strtolower($uid) === $lowerSearch ||
116+
$lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
117117
strtolower($userDisplayName) === $lowerSearch ||
118-
strtolower($userEmail) === $lowerSearch
118+
strtolower($userEmail) === $lowerSearch)
119119
) {
120120
if (strtolower($uid) === $lowerSearch) {
121121
$foundUserById = true;

0 commit comments

Comments
 (0)