Skip to content

Make resource CSRF parameter name configurable#19010

Closed
michalkaczmarek-bitbag wants to merge 12 commits into
Sylius:2.2from
michalkaczmarek-bitbag:bugfix/action-csrf-token
Closed

Make resource CSRF parameter name configurable#19010
michalkaczmarek-bitbag wants to merge 12 commits into
Sylius:2.2from
michalkaczmarek-bitbag:bugfix/action-csrf-token

Conversation

@michalkaczmarek-bitbag

Copy link
Copy Markdown
Contributor
Q A
Branch? 2.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets #19008, #19001, Sylius/SyliusResourceBundle#1163
License MIT

Summary

Replaces hardcoded _csrf_token field name across resource action templates
and admin actions with a configurable parameter, allowing projects to customize
the CSRF field name via configuration.

Motivation

The CSRF field name for resource actions (delete, cancel, refund, resend email,
avatar removal, etc.) was hardcoded to _csrf_token in 18 templates and
3 PHP actions. Projects requiring custom CSRF field names (for security
conventions or framework compliance) had no way to override it.

@michalkaczmarek-bitbag michalkaczmarek-bitbag requested review from a team as code owners May 18, 2026 16:19
@probot-autolabeler probot-autolabeler Bot added the Admin AdminBundle related issues and PRs. label May 18, 2026
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 15a19dd8-eaeb-4624-a734-db82dd361404

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin AdminBundle related issues and PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants