From b02921e5ec724cb3de0b50e520ca780be703c42e Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 5 Nov 2024 14:10:17 +0100 Subject: [PATCH] fix(contactsintegration): Limit number of search results Signed-off-by: Christoph Wurst --- lib/Service/ContactsIntegration.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Service/ContactsIntegration.php b/lib/Service/ContactsIntegration.php index 949f5008a4..da53a72b88 100644 --- a/lib/Service/ContactsIntegration.php +++ b/lib/Service/ContactsIntegration.php @@ -227,7 +227,8 @@ private function doSearch(string $term, array $fields, bool $strictSearch, bool $allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') === 'yes'; $result = $this->contactsManager->search($term, $fields, [ - 'strict_search' => $strictSearch + 'strict_search' => $strictSearch, + 'limit' => 20, ]); $matches = []; foreach ($result as $r) {