Skip to content

Commit f1c30e4

Browse files
committed
minor #6207 revert form login CSRF changes on wrong branch (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- revert form login CSRF changes on wrong branch | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.7+ | Fixed tickets | #6194 Commits ------- 3a2a714 revert form login CSRF changes on wrong branch
2 parents c0d1ed1 + 3a2a714 commit f1c30e4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

cookbook/security/csrf_in_login_form.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ provider available in the Security component:
3333
# ...
3434
form_login:
3535
# ...
36-
csrf_token_generator: security.csrf.token_manager
36+
csrf_provider: security.csrf.token_manager
3737
3838
.. code-block:: xml
3939
@@ -50,7 +50,7 @@ provider available in the Security component:
5050
5151
<firewall name="secured_area">
5252
<!-- ... -->
53-
<form-login csrf-token-generator="security.csrf.token_manager" />
53+
<form-login csrf-provider="security.csrf.token_manager" />
5454
</firewall>
5555
</config>
5656
</srv:container>
@@ -66,7 +66,7 @@ provider available in the Security component:
6666
// ...
6767
'form_login' => array(
6868
// ...
69-
'csrf_token_generator' => 'security.csrf.token_manager',
69+
'csrf_provider' => 'security.csrf.token_manager',
7070
),
7171
),
7272
),
@@ -122,7 +122,7 @@ After this, you have protected your login form against CSRF attacks.
122122
.. tip::
123123

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

127127
.. configuration-block::
128128

@@ -138,7 +138,7 @@ After this, you have protected your login form against CSRF attacks.
138138
form_login:
139139
# ...
140140
csrf_parameter: _csrf_security_token
141-
csrf_token_id: a_private_string
141+
intention: a_private_string
142142
143143
.. code-block:: xml
144144
@@ -156,7 +156,7 @@ After this, you have protected your login form against CSRF attacks.
156156
<firewall name="secured_area">
157157
<!-- ... -->
158158
<form-login csrf-parameter="_csrf_security_token"
159-
csrf-token-id="a_private_string"
159+
intention="a_private_string"
160160
/>
161161
</firewall>
162162
</config>
@@ -174,7 +174,7 @@ After this, you have protected your login form against CSRF attacks.
174174
'form_login' => array(
175175
// ...
176176
'csrf_parameter' => '_csrf_security_token',
177-
'csrf_token_id' => 'a_private_string'
177+
'intention' => 'a_private_string'
178178
),
179179
),
180180
),

reference/configuration/security.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ Each part will be explained in the next section.
162162
163163
# csrf token options
164164
csrf_parameter: _csrf_token
165-
csrf_token_id: authenticate
166-
csrf_token_generator: my.csrf_token_generator.id
165+
intention: authenticate
166+
csrf_provider: my.csrf_token_generator.id
167167
168168
# by default, the login form *must* be a POST, not a GET
169169
post_only: true

0 commit comments

Comments
 (0)