Repository navigation
fix(security): empty access_roles deny and CSRF fails closed - #7
Merged
Merged
Conversation
- 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.
|
@coderabbitai review |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
ConfigurablePageLayoutKitAccessCheckerreturnedtrueforsecurity.access_roles: [], opening the layout admin and block edit endpoints to every user reaching them. An empty list now grants nothing;NowoPageLayoutKitExtensionthrows at compile time foraccess_roles: []withoutaccess_checker/allow_unauthenticated.CsrfProtectionPassrefuses to compile withoutsecurity.csrf.token_manager+form.type_extension.csrf, or withframework.form.csrf_protection: false(block reorder / edit forms would otherwise accept forged POSTs).symfony/security-csrfis now required.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.