Skip to content

Commit

Permalink
Merge branch '7.1' into 7.2
Browse files Browse the repository at this point in the history
* 7.1:
  Update csrf.rst
  • Loading branch information
javiereguiluz committed Jun 12, 2024
2 parents 1444df8 + 46bceaf commit 2e2afa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/csrf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ object evaluated to the id::
use Symfony\Component\Security\Http\Attribute\IsCsrfTokenValid;
// ...

#[IsCsrfTokenValid(new Expression('"delete-item-" ~ args["post"].id'), tokenKey: 'token')]
#[IsCsrfTokenValid(new Expression('"delete-item-" ~ args["post"].getId()'), tokenKey: 'token')]
public function delete(Post $post): Response
{
// ... do something, like deleting an object
Expand Down

0 comments on commit 2e2afa7

Please sign in to comment.