summaryrefslogtreecommitdiffstats
path: root/lib/private/Contacts/ContactsMenu/ContactsStore.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-12-08 17:26:30 +0100
committerJoas Schilling <coding@schilljs.com>2021-12-08 18:58:54 +0100
commitd49ad7ea47e35a463e4953c9922a5af77ff7acf2 (patch)
treee31d876e995cf616597dea237c92a1e1aeef1f10 /lib/private/Contacts/ContactsMenu/ContactsStore.php
parent0f1670be8a1fa25ebab9b5d7bdf074adf1587e4d (diff)
downloadnextcloud-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/Contacts/ContactsMenu/ContactsStore.php')
-rw-r--r--lib/private/Contacts/ContactsMenu/ContactsStore.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php
index cd1cc9b6169..a27c2ae455a 100644
--- a/lib/private/Contacts/ContactsMenu/ContactsStore.php
+++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php
@@ -96,7 +96,10 @@ class ContactsStore implements IContactsStore {
* @return IEntry[]
*/
public function getContacts(IUser $user, $filter, ?int $limit = null, ?int $offset = null) {
- $options = [];
+ $options = [
+ 'enumeration' => $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes',
+ 'fullmatch' => $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes',
+ ];
if ($limit !== null) {
$options['limit'] = $limit;
}
@@ -270,7 +273,9 @@ class ContactsStore implements IContactsStore {
return null;
}
- $contacts = $this->contactsManager->search($shareWith, $filter);
+ $contacts = $this->contactsManager->search($shareWith, $filter, [
+ 'strict_search' => true,
+ ]);
$match = null;
foreach ($contacts as $contact) {