This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(quality): enumeration guard, value cap, attribute migration, concurrency lock, group-resolution — M3, M6, M7, M8, L5#348
Merged
Conversation
… concurrency lock, group-resolution unification — M3, M6, M7, M8, L5 M3 (#331): raise searchSharees minimum query length from 1 to 2 characters — limits single-character a..z user/group directory sweeps consistent with NC's own share-autocomplete threshold. M6 (#334): PreferencesController::setPreference now rejects values longer than 8192 bytes (HTTP 400) to prevent unbounded oc_preferences row growth from malicious callers. M7 (#335): PreferencesController @NoAdminRequired / @NoCSRFRequired docblock annotations converted to PHP 8 attribute form (#[NoAdminRequired], #[NoCSRFRequired]) for forward-compatibility with NC 30+ strict-attribute mode. M8 (#336): DemoShowcasesService::installShowcase acquires an exclusive ILockingProvider advisory lock before the existence check, preventing duplicate dashboard rows from concurrent installs of the same showcase. L5 (#341): DashboardMetadataController::canRead and canWrite now call AdminTemplateService::getUserGroupIdsFor (REQ-TMPL-013 — single source of truth) instead of IGroupManager::isInGroup directly, keeping virtual group resolution consistent with the service layer.
…etadataController conflict PRs 345-347 merged to development first; DashboardMetadataController was touched by both #345 (H5: delegate to PermissionService) and this branch (L5: use AdminTemplateService). Taking development's version as it already applies the stronger H5+L5 combined fix via PermissionService.
This was referenced May 27, 2026
Closed
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
searchShareesminimum query length raised from 1 to 2 characters — limits single-character a..z user/group directory sweeps consistent with NC's own share-autocomplete threshold.PreferencesController::setPreferencenow rejects values longer than 8192 bytes (HTTP 400) to prevent unboundedoc_preferencesrow growth from malicious callers.PreferencesController@NoAdminRequired/@NoCSRFRequireddocblock annotations converted to PHP 8 attribute form (#[NoAdminRequired],#[NoCSRFRequired]) for forward-compatibility with NC 30+ strict-attribute mode.DemoShowcasesService::installShowcaseacquires an exclusiveILockingProvideradvisory lock before the existence check, preventing duplicate dashboard rows from concurrent admin installs of the same showcase.DashboardMetadataController::canReadandcanWritenow callAdminTemplateService::getUserGroupIdsFor(REQ-TMPL-013 — single source of truth) instead ofIGroupManager::isInGroupdirectly, keeping virtual/nested group resolution consistent with the service layer.Test plan
searchSharees?query=a→ empty result (was returning matches)searchSharees?query=ab→ matches as beforesetPreferencewith value >8192 bytes → HTTP 400getPreference/setPreferencestill work for non-admin users (attributes in effect)POST /admin/showcases/{id}/install→ second call gets error, no duplicate dashboards🤖 Generated with Claude Code