Skip to content

fix(security): empty access_roles deny and CSRF fails closed - #7

Merged
HecFranco merged 1 commit into
mainfrom
sec-empty-roles
Oct 28, 2026
Merged

HecFranco merged 1 commit into
mainfrom
sec-empty-roles

Conversation

@HecFranco

Copy link
Copy Markdown
Contributor

Changes

  • P1 empty roles: ConfigurablePageLayoutKitAccessChecker returned true for security.access_roles: [], opening the layout admin and block edit endpoints to every user reaching them. An empty list now grants nothing; NowoPageLayoutKitExtension throws at compile time for access_roles: [] without access_checker / allow_unauthenticated.
  • P2 CSRF: new CsrfProtectionPass refuses to compile without security.csrf.token_manager + form.type_extension.csrf, or with framework.form.csrf_protection: false (block reorder / edit forms would otherwise accept forged POSTs). symfony/security-csrf is now required.
  • CHANGELOG (Unreleased / Security), UPGRADING, CONFIGURATION, SECURITY.

Same fix as PageBuilderKit 1.10.0 / ApiStudio 1.8.0 / Performance 3.11.0 (2026-10-28 review). Default config ([ROLE_EDITOR], CSRF on) is unaffected.

Checks (local, Docker)

composer-sync, cs-check, rector-dry, phpstan, igor, validate-translations OK; 212 tests, line coverage 100 %.

Proposed release: 1.8.0.

- ConfigurablePageLayoutKitAccessChecker returned true for access_roles: [],
  opening the layout admin and block edit endpoints to every user. An empty
  list now grants nothing and the extension refuses to compile it unless
  access_checker or allow_unauthenticated is set.
- CsrfProtectionPass refuses to compile without security.csrf.token_manager and
  form.type_extension.csrf, or with framework.form.csrf_protection: false.
  symfony/security-csrf is now required.
@github-actions

Copy link
Copy Markdown

@coderabbitai review

@HecFranco
HecFranco merged commit d0626f0 into main Oct 28, 2026
14 checks passed
@HecFranco
HecFranco deleted the sec-empty-roles branch October 28, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant