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 support for dynamic CSRF id with Expression in#[IsCsrfTokenValid]#19870

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

Merged
OskarStark merged 1 commit intosymfony:7.1fromalamirault:19753/dynamic-csrf
May 10, 2024

Conversation

@alamirault
Copy link
Contributor

@rcsofttech85
Copy link
Contributor

rcsofttech85 commentedMay 8, 2024
edited by OskarStark
Loading

you may consider changing your code to this...

    #[IsCsrfTokenValid(newExpression('"delete-item-" ~ args["post"].id'), tokenKey:'token')]publicfunctiondelete(Post$post):Response    {// ... do something, like deleting an object    }

post argument is mandatory in this case

@alamirault
Copy link
ContributorAuthor

You're right, updated

rcsofttech85 reacted with thumbs up emoji

@OskarStark
Copy link
Contributor

Thank you Antoine.

@OskarStarkOskarStark merged commitf35eec7 intosymfony:7.1May 10, 2024
@alamiraultalamirault deleted the 19753/dynamic-csrf branchMay 10, 2024 12:42
@yguedidi
Copy link
Contributor

Thank you@alamirault

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

Reviewers

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

[Security] Add support for dynamic CSRF id with Expression in `#[IsCsrf…

6 participants

@alamirault@rcsofttech85@OskarStark@yguedidi@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp