Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Security] Add usage example for#[IsCsrfTokenValid attribute on controller classes#20975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

santysisi
Copy link
Contributor

This PR updates the documentation to demonstrate how theIsCsrfTokenValid attribute can be applied directly to a controller class.

By applying this attribute at the class level, CSRF token validation will be automatically executed for all routes defined within the controller, ensuring consistent security across all actions without needing to annotate each method individually.

The example includes the appropriate use statements and a sample controller implementation for clarity.

@javiereguiluzjaviereguiluz changed the base branch from7.3 to7.2May 22, 2025 15:42
@javiereguiluzjaviereguiluzforce-pushed theiscsrftokenvalid-controller-usage branch from76c0473 tof97b8d5CompareMay 22, 2025 15:42
@OskarStarkOskarStark changed the title[Security] Add usage example for IsCsrfTokenValid attribute on controller classes[Security] Add usage example for#[IsCsrfTokenValid attribute on controller classesMay 22, 2025
@javiereguiluzjaviereguiluz merged commit9032cf6 intosymfony:7.2May 22, 2025
3 checks passed
@javiereguiluz
Copy link
Member

I like this. Merged! (in 7.2 and 7.3 branches). Thanks Santiago!

santysisi reacted with heart emojisantysisi reacted with rocket emoji

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

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
7.2
Development

Successfully merging this pull request may close these issues.

3 participants
@santysisi@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp