Skip to content

revert form login CSRF changes on wrong branch #6207

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

Merged
merged 1 commit into from
Jan 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 7 additions & 7 deletions cookbook/security/csrf_in_login_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ provider available in the Security component:
# ...
form_login:
# ...
csrf_token_generator: security.csrf.token_manager
csrf_provider: security.csrf.token_manager

.. code-block:: xml

Expand All @@ -50,7 +50,7 @@ provider available in the Security component:

<firewall name="secured_area">
<!-- ... -->
<form-login csrf-token-generator="security.csrf.token_manager" />
<form-login csrf-provider="security.csrf.token_manager" />
</firewall>
</config>
</srv:container>
Expand All @@ -66,7 +66,7 @@ provider available in the Security component:
// ...
'form_login' => array(
// ...
'csrf_token_generator' => 'security.csrf.token_manager',
'csrf_provider' => 'security.csrf.token_manager',
),
),
),
Expand Down Expand Up @@ -122,7 +122,7 @@ After this, you have protected your login form against CSRF attacks.
.. tip::

You can change the name of the field by setting ``csrf_parameter`` and change
the token ID by setting ``csrf_token_id`` in your configuration:
the token ID by setting ``intention`` in your configuration:

.. configuration-block::

Expand All @@ -138,7 +138,7 @@ After this, you have protected your login form against CSRF attacks.
form_login:
# ...
csrf_parameter: _csrf_security_token
csrf_token_id: a_private_string
intention: a_private_string

.. code-block:: xml

Expand All @@ -156,7 +156,7 @@ After this, you have protected your login form against CSRF attacks.
<firewall name="secured_area">
<!-- ... -->
<form-login csrf-parameter="_csrf_security_token"
csrf-token-id="a_private_string"
intention="a_private_string"
/>
</firewall>
</config>
Expand All @@ -174,7 +174,7 @@ After this, you have protected your login form against CSRF attacks.
'form_login' => array(
// ...
'csrf_parameter' => '_csrf_security_token',
'csrf_token_id' => 'a_private_string'
'intention' => 'a_private_string'
),
),
),
Expand Down
4 changes: 2 additions & 2 deletions reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ Each part will be explained in the next section.

# csrf token options
csrf_parameter: _csrf_token
csrf_token_id: authenticate
csrf_token_generator: my.csrf_token_generator.id
intention: authenticate
csrf_provider: my.csrf_token_generator.id

# by default, the login form *must* be a POST, not a GET
post_only: true
Expand Down