Skip to content

Commit

Permalink
Tweak login forms to enable double-submit CSRF protection
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Sep 13, 2024
1 parent a3b7f14 commit 97636c3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Resources/skeleton/authenticator/login_form.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
autocomplete="off"
data-controller="csrf-protection"
>
<?php if($support_remember_me && !$always_remember_me): ?>

Expand Down
2 changes: 2 additions & 0 deletions src/Resources/skeleton/security/formLogin/login_form.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

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

{#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

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

{#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

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

{#
Expand Down

0 comments on commit 97636c3

Please sign in to comment.