This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(security): resolve CRITICAL IDOR, DoS, and OR-API drift — #319-#323#343
Open
rubenvdlinde wants to merge 1 commit into
Open
fix(security): resolve CRITICAL IDOR, DoS, and OR-API drift — #319-#323#343rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
-#323) C1 (#319): GET /api/dashboards/tree now filters by user-visible UUIDs via DashboardTreeService::getFilteredTree() — cross-user enumeration blocked. C2 (#320): GET /api/dashboards/by-path/{path} now calls PermissionService::canViewDashboard() after slug resolution; returns 404 on access denial to prevent slug enumeration. C3 (#321): DashboardLockService::acquireLock() and heartbeat() now check PermissionService::canViewDashboard() before acquiring; controller maps LockForbiddenException to HTTP 403. C4 (#322): RuleApiController::updateRule() and deleteRule() now load the rule first, then call PermissionService::verifyPlacementOwnership() before any mutation; ConditionalService gains a public findRule() method. C5 (#323): ManifestController replaces the non-existent ObjectService::findObjects() with the real findAll() API — manifests now populate correctly when OpenRegister is active. Pre-existing: ActionAuthService REQ-TMPL-013 violation fixed (route through AdminTemplateService::getUserGroupIdsFor instead of direct IGroupManager call). Missing Http import in ManifestController fixed. Pre-existing test suite drift also resolved: admin controller tests updated to match constructors and #[AuthorizedAdminSetting] middleware pattern (groupManager parameters removed, middleware-guard assertions removed, ResourceController/ResourceServeController split reconciled). All 1037 unit tests pass; phpstan level-5 clean (68 pre-existing baselined).
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
GET /api/dashboards/tree: tree endpoint now filters results to user-visible dashboards only viaDashboardTreeService::getFilteredTree().GET /api/dashboards/by-path/{path}: endpoint now callsPermissionService::canViewDashboard()after resolving the slug; returns 404 (not 403) to prevent slug enumeration.DashboardLockService::acquireLock()andheartbeat()now gate onPermissionService::canViewDashboard(); controller mapsLockForbiddenExceptionto HTTP 403.RuleApiControllerownership gap:updateRule()anddeleteRule()now load the rule first and callPermissionService::verifyPlacementOwnership()before any write;ConditionalService::findRule()added.ManifestControllerOR-API drift: replaced non-existentObjectService::findObjects()with the realfindAll()API — manifests now populate when OpenRegister is active.Pre-existing fixes:
ActionAuthServiceREQ-TMPL-013 violation fixed; missinguse OCP\AppFramework\HttpinManifestControllerfixed. Test suite drift in 11 admin controller tests resolved (constructor signatures +#[AuthorizedAdminSetting]middleware pattern).Test plan
DashboardTreeServiceTest(2 C1),DashboardLockServiceTest(2 C3),RuleApiControllerSecurityTest(6 C4)Closes #319, #320, #321, #322, #323