diff options
author | Joas Schilling <coding@schilljs.com> | 2021-12-08 17:26:30 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-12-08 18:58:54 +0100 |
commit | d49ad7ea47e35a463e4953c9922a5af77ff7acf2 (patch) | |
tree | e31d876e995cf616597dea237c92a1e1aeef1f10 /lib/private/Share | |
parent | 0f1670be8a1fa25ebab9b5d7bdf074adf1587e4d (diff) | |
download | nextcloud-server-d49ad7ea47e35a463e4953c9922a5af77ff7acf2.tar.gz nextcloud-server-d49ad7ea47e35a463e4953c9922a5af77ff7acf2.zip |
Limit more contact searches
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Share')
-rw-r--r-- | lib/private/Share/Share.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index a857a850f9b..548c8a2c451 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -593,7 +593,12 @@ class Share extends Constants { $row['share_with_displayname'] = $shareWithUser === null ? $row['share_with'] : $shareWithUser->getDisplayName(); } elseif (isset($row['share_with']) && $row['share_with'] != '' && $row['share_type'] === IShare::TYPE_REMOTE) { - $addressBookEntries = \OC::$server->getContactsManager()->search($row['share_with'], ['CLOUD']); + $addressBookEntries = \OC::$server->getContactsManager()->search($row['share_with'], ['CLOUD'], [ + 'limit' => 1, + 'enumeration' => false, + 'fullmatch' => false, + 'strict_search' => true, + ]); foreach ($addressBookEntries as $entry) { foreach ($entry['CLOUD'] as $cloudID) { if ($cloudID === $row['share_with']) { |