Skip to content

[HIGH] H4: Mutating Aanbod/AangebodenGebruik endpoints incorrectly declared @PublicPage #336

Description

@rubenvdlinde

Severity: HIGH

Location: lib/Controller/AanbodController.php lines 159–243 (acceptAanbod, denyAanbod); lib/Controller/AangebodenGebruikController.php lines 606–810 (setGebruikSelfToActiveOrg, deleteGebruikAsAfnemer)

Description:
Multiple state-mutating endpoints (acceptAanbod, denyAanbod, setGebruikSelfToActiveOrg, deleteGebruikAsAfnemer) are declared @PublicPage. The only runtime guard is an implicit getCurrentOrganisation() null-check, which returns null for anonymous callers, causing early return rather than a 401/403 response. This means anonymous requests are silently swallowed but the endpoints remain publicly addressable write surfaces with no authentication requirement enforced by the framework layer.

Suggested fix:
Drop @PublicPage from all state-changing routes; use @NoAdminRequired at most, so that the NC framework enforces at minimum a logged-in session before the controller method executes.


Source: deep team-reviewer pass 2026-05-27

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions