Fix csrf-tokens

This commit is contained in:
2025-04-21 14:09:02 +02:00
parent 4863fad3ba
commit acd85bfc2b
6 changed files with 11 additions and 16 deletions

View File

@@ -15,15 +15,17 @@
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control"
autocomplete="email" required autofocus>
</div>
<div class="mb-3">
<label for="password" class="form-label">{{ 'Password'|trans }}</label>
<input type="password" name="_password" id="password" class="form-control"
autocomplete="current-password"
required>
</div>
<input type="hidden" name="_csrf_token"
value="{{ csrf_token('authenticate') }}"
>
<input type="hidden" name="_csrf_token" data-controller="csrf-protection"
value="{{ csrf_token('authenticate') }}">
<div class="mb-3 form-check">
<input type="checkbox" name="_remember_me" id="_remember_me" class="form-check-input">
<label for="_remember_me" class="form-check-label">{{ 'Remember me'|trans }}</label>

View File

@@ -2,6 +2,7 @@
{% block body %}
{{ question.question }}<br/>
<form method="post">
<input type="hidden" name="token" value="{{ csrf_token('question') }}">
{% for answer in question.answers %}
<div>
<button class="btn btn-outline-success"