Skip to content

Commit f125072

Browse files
authored
Merge pull request #23091 from nextcloud/backport/23074/stable18
[stable18] Do not match sharees on an empty email address
2 parents 6f18e4c + fb966b4 commit f125072

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
@@ -101,9 +101,9 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
101101
$userEmail = $user->getEMailAddress();
102102
$uid = (string) $uid;
103103
if (
104-
strtolower($uid) === $lowerSearch ||
104+
$lowerSearch !== '' && (strtolower($uid) === $lowerSearch ||
105105
strtolower($userDisplayName) === $lowerSearch ||
106-
strtolower($userEmail) === $lowerSearch
106+
strtolower($userEmail) === $lowerSearch)
107107
) {
108108
if (strtolower($uid) === $lowerSearch) {
109109
$foundUserById = true;

0 commit comments

Comments
 (0)