This repository was archived by the owner on May 29, 2026. It is now read-only.
fix(security): clear Bucket-B (ADR-023 + auth/routing)#199
Merged
Conversation
…bute/routing fixes)
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
Clears all Bucket-B security findings for larpingapp as identified by the Hydra gate sweep.
Gate before → after
*Gate 7 was PASS before the fix but would have failed once gate-5 was addressed — adding
#[NoAdminRequired]without a body guard triggers it. Both are fixed together.Changes made
lib/Controller/CharactersController.phpPosture decision:
downloadPdfis a user-invokable read+action (character PDF download). Correct posture is#[NoAdminRequired]+ null-user 401 guard.use OCP\AppFramework\Http\Attribute\NoAdminRequiredandNoCSRFRequiredimportsuse OCP\AppFramework\Http;anduse OCP\IUserSession;importsIUserSession $userSessionconstructor parameter injection#[NoAdminRequired]and#[NoCSRFRequired]directly before the method signature (within the scanner's 20-line window)downloadPdfbodyRoute analysis:
characters#downloadPdf→GET /characters/{id}/download/{template}. Confirmed no frontendfetch()callers insrc/— this endpoint is called by direct navigation (PDF download link). No routes changed or removed.tests/unit/Controller/CharactersControllerTest.phpIUserSessionmock with default authenticated user tosetUp()testDownloadPdfReturns401WhenNotAuthenticated()test for the new guard pathADR-023 kit
Not ported — no
requireAction()calls were needed.downloadPdfis a user-scoped read with no privileged action; the null-user 401 guard is the correct and sufficient posture.Verification
php -l: cleancomposer check:strict: ALL CHECKS PASSED (77 tests, 198 assertions)Refs #197