8000 4668 document isCsrfTokenValid by snoek09 · Pull Request #5572 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

4668 document isCsrfTokenValid #5572

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
4668 change title
  • Loading branch information
Henry Snoek committed Jul 28, 2015
commit e719d563f967a14c5f0d8d72b2e6b15114d726c6
7 changes: 3 additions & 4 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,8 @@ Just like when creating a controller for a route, the order of the arguments of
order of the arguments, Symfony will still pass the correct value to each
variable.

Checking the Validity of a CSRF Token
-------------------------------------
Validating a CSRF Token
-----------------------

Sometimes you want to use CSRF protection in an action where you don't want to use the
Symfony Form component.
Expand All @@ -819,8 +819,7 @@ method to check the CSRF token::

.. versionadded:: 2.6
The ``isCsrfTokenValid()`` shortcut method was introduced in Symfony 2.6.

It is equivalent to executing the following code::
It is equivalent to executing the following code::

use Symfony\Component\Security\Csrf\CsrfToken;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this code listing be indented?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, will do after the merge


Expand Down
0