Skip to content

Commit cf019b2

Browse files
nfebebackportbot[bot]
authored andcommitted
fix(sharing): Align userid config key in UserPlugin with Manager
UserPlugin reads `shareapi_restrict_user_enumeration_full_match_userid` (no underscore) while Manager.php and the frontend both use `shareapi_restrict_user_enumeration_full_match_user_id` (with underscore). This mismatch causes the "disable exact match by user ID" admin setting to have no effect on actual sharee search results. Signed-off-by: nfebe <fenn25.fn@gmail.com>
1 parent fdca3b4 commit cf019b2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build/integration/features/bootstrap/ShareesContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function resetAppConfigs() {
2828
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match');
2929
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_email');
3030
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn');
31-
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_userid');
31+
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_user_id');
3232
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_to_group');
3333
$this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_to_phone');
3434
}

build/integration/sharees_features/sharees_user.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ Feature: sharees_user
345345
And user "test2" belongs to group "groupA"
346346
And As an "test"
347347
And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no"
348-
And parameter "shareapi_restrict_user_enumeration_full_match_userid" of app "core" is set to "no"
348+
And parameter "shareapi_restrict_user_enumeration_full_match_user_id" of app "core" is set to "no"
349349
When getting sharees for
350350
| search | test1 |
351351
| itemType | file |

lib/private/Collaboration/Collaborators/UserPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
8383
// Even if normal sharee enumeration is not allowed, full matches are still allowed.
8484
$shareeEnumerationFullMatch = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes';
8585
if ($shareeEnumerationFullMatch && $search !== '') {
86-
$shareeEnumerationFullMatchUserId = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes';
86+
$shareeEnumerationFullMatchUserId = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_user_id', 'yes') === 'yes';
8787
$shareeEnumerationFullMatchEmail = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes';
8888
$shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes';
8989

0 commit comments

Comments
 (0)