From cf019b275824bf86643ea5d1b1c0409d668a1b61 Mon Sep 17 00:00:00 2001 From: nfebe Date: Thu, 12 Mar 2026 13:18:11 +0100 Subject: [PATCH] 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 --- build/integration/features/bootstrap/ShareesContext.php | 2 +- build/integration/sharees_features/sharees_user.feature | 2 +- lib/private/Collaboration/Collaborators/UserPlugin.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/integration/features/bootstrap/ShareesContext.php b/build/integration/features/bootstrap/ShareesContext.php index bc670bbb2db03..6a4b3755a365d 100644 --- a/build/integration/features/bootstrap/ShareesContext.php +++ b/build/integration/features/bootstrap/ShareesContext.php @@ -28,7 +28,7 @@ protected function resetAppConfigs() { $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match'); $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_email'); $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn'); - $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_userid'); + $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_full_match_user_id'); $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_to_group'); $this->deleteServerConfig('core', 'shareapi_restrict_user_enumeration_to_phone'); } diff --git a/build/integration/sharees_features/sharees_user.feature b/build/integration/sharees_features/sharees_user.feature index 25cbd569fec24..e5ed0c28bf264 100644 --- a/build/integration/sharees_features/sharees_user.feature +++ b/build/integration/sharees_features/sharees_user.feature @@ -345,7 +345,7 @@ Feature: sharees_user And user "test2" belongs to group "groupA" And As an "test" And parameter "shareapi_allow_share_dialog_user_enumeration" of app "core" is set to "no" - And parameter "shareapi_restrict_user_enumeration_full_match_userid" of app "core" is set to "no" + And parameter "shareapi_restrict_user_enumeration_full_match_user_id" of app "core" is set to "no" When getting sharees for | search | test1 | | itemType | file | diff --git a/lib/private/Collaboration/Collaborators/UserPlugin.php b/lib/private/Collaboration/Collaborators/UserPlugin.php index 19add9e1b659f..279069f058975 100644 --- a/lib/private/Collaboration/Collaborators/UserPlugin.php +++ b/lib/private/Collaboration/Collaborators/UserPlugin.php @@ -83,7 +83,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b // Even if normal sharee enumeration is not allowed, full matches are still allowed. $shareeEnumerationFullMatch = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match', 'yes') === 'yes'; if ($shareeEnumerationFullMatch && $search !== '') { - $shareeEnumerationFullMatchUserId = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_userid', 'yes') === 'yes'; + $shareeEnumerationFullMatchUserId = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_user_id', 'yes') === 'yes'; $shareeEnumerationFullMatchEmail = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_email', 'yes') === 'yes'; $shareeEnumerationFullMatchIgnoreSecondDisplayName = $this->appConfig->getValueString('core', 'shareapi_restrict_user_enumeration_full_match_ignore_second_dn', 'no') === 'yes';