Skip to content

Commit 05f70cc

Browse files
committed
minor #20530 Add data-controller="csrf-protection" to CSRF fields (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- Add data-controller="csrf-protection" to CSRF fields Submitting on 6.4 so that the resulting apps can more easily be updated to 7.2 See symfony/symfony#59111 Commits ------- e818e12 Add data-controller="csrf-protection" to CSRF fields
2 parents e0eef28 + e818e12 commit 05f70cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ be ``authenticate``:
10281028
<form action="{{ path('app_login') }}" method="post">
10291029
{# ... the login fields #}
10301030

1031-
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
1031+
<input type="hidden" name="_csrf_token" data-controller="csrf-protection" value="{{ csrf_token('authenticate') }}">
10321032

10331033
<button type="submit">login</button>
10341034
</form>

0 commit comments

Comments
 (0)