Skip to content

Commit 2e8ed36

Browse files
committed
fix(contacts): Use correct default for shareapi_allow_share_dialog_user_enumeration
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent 787f714 commit 2e8ed36

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/Service/ContactsIntegration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function getMatchingRecipient(string $userId, string $term): array {
5252

5353
// If 'Allow username autocompletion in share dialog' is disabled in the admin sharing settings, then we must not
5454
// auto-complete system users
55-
$shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') === 'yes';
55+
$shareeEnumeration = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
5656
$shareeEnumerationInGroupOnly = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes';
5757
$shareeEnumerationFullMatch = $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes';
5858
$shareeEnumerationFullMatchUserId = $shareeEnumerationFullMatch && $this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes';
@@ -233,7 +233,7 @@ public function newContact(string $name, string $mailAddr, string $type = 'HOME'
233233
* @param string[] $fields
234234
*/
235235
private function doSearch(string $term, array $fields, bool $strictSearch) : array {
236-
$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') === 'yes';
236+
$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
237237

238238
$result = $this->contactsManager->search($term, $fields, [
239239
'strict_search' => $strictSearch,

lib/Service/Group/ContactsGroupService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function search(string $term): array {
4444

4545
// If 'Allow username autocompletion in share dialog' is disabled in the admin sharing settings, then we must not
4646
// auto-complete system users
47-
$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') === 'yes';
47+
$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
4848

4949
$result = $this->contactsManager->search($term, ['CATEGORIES']);
5050
$receivers = [];
@@ -73,7 +73,7 @@ public function getUsers(string $groupId): array {
7373

7474
// If 'Allow username autocompletion in share dialog' is disabled in the admin sharing settings, then we must not
7575
// auto-complete system users
76-
$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') === 'yes';
76+
$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
7777

7878
$result = $this->contactsManager->search($groupId, ['CATEGORIES']);
7979
$receivers = [];

tests/Unit/Service/ContactsIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function common($term, $searchResult, $allowSystemUsers, $allowSystemUser
347347
$this->config->expects(self::atLeast(3))
348348
->method('getAppValue')
349349
->withConsecutive(
350-
['core', 'shareapi_allow_share_dialog_user_enumeration', 'no'],
350+
['core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'],
351351
['core', 'shareapi_restrict_user_enumeration_to_group', 'no'],
352352
['core', 'shareapi_restrict_user_enumeration_full_match', 'yes'],
353353
['core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes'],

tests/Unit/Service/Group/ContactsGroupServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testSearchGroups() {
7272
];
7373
$this->config->expects($this->once())
7474
->method('getAppValue')
75-
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'no')
75+
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
7676
->willReturn('yes');
7777
$this->contactsManager->expects($this->once())
7878
->method('isEnabled')
@@ -135,7 +135,7 @@ public function testGetUsersForGroup() {
135135
];
136136
$this->config->expects($this->once())
137137
->method('getAppValue')
138-
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'no')
138+
->with('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes')
139139
->willReturn('yes');
140140
$this->contactsManager->expects($this->once())
141141
->method('isEnabled')

0 commit comments

Comments
 (0)