Skip to content

Commit

Permalink
fix(contactsintegration): Limit number of matches
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Nov 22, 2024
1 parent a6c4f2f commit 547d824
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/Service/ContactsIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@ public function getMatchingRecipient(string $userId, string $term): array {
$shareeEnumerationFullMatchUserId = $shareeEnumerationFullMatch && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes';
$shareeEnumerationFullMatchEmail = $shareeEnumerationFullMatch && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes';

$result = $this->contactsManager->search($term, ['UID', 'FN', 'EMAIL'], ['enumeration' => $shareeEnumeration, 'fullmatch' => $shareeEnumerationFullMatch]);
/ $result = $this->contactsManager->search(

Check failure on line 61 in lib/Service/ContactsIntegration.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-master

ParseError

lib/Service/ContactsIntegration.php:61:1: ParseError: Syntax error, unexpected '/' on line 61 (see https://psalm.dev/173)
$term,
['UID', 'FN', 'EMAIL'],
[
'enumeration' => $shareeEnumeration,
'fullmatch' => $shareeEnumerationFullMatch,
'limit' => 20,
],
);
if (empty($result)) {
return [];
}
Expand Down

0 comments on commit 547d824

Please sign in to comment.