summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-10-01 09:01:08 +0200
committerGitHub <noreply@github.com>2020-10-01 09:01:08 +0200
commit12abb5d2d38c124a28460c4d52608e247ce31385 (patch)
treed8ed83e6b7108785cb410dd27bb727df645d1386 /lib
parent99e5940a7fe9cb7bb37a2fcf4b43dd7c781fdf73 (diff)
parent1c65d33e9ffa4d18f62ec5d4fd4cd08cddb236d1 (diff)
downloadnextcloud-server-12abb5d2d38c124a28460c4d52608e247ce31385.tar.gz
nextcloud-server-12abb5d2d38c124a28460c4d52608e247ce31385.zip
Merge pull request #23090 from nextcloud/backport/23074/stable19
[stable19] Do not match sharees on an empty email address
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Collaboration/Collaborators/UserPlugin.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php
index 3566abf0a05..2096ec4621e 100644
--- a/lib/private/Collaboration/Collaborators/UserPlugin.php
+++ b/lib/private/Collaboration/Collaborators/UserPlugin.php
@@ -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;