feat: implement CSRF protection across forms and routes

This commit is contained in:
2026-05-09 22:09:19 +02:00
parent a714c53a07
commit e445a5eaf4
14 changed files with 147 additions and 8 deletions

View File

@@ -38,6 +38,7 @@
{% if ctx.is_current_user(entry.review().user_id().value()) %}
<form method="post" action="/reviews/{{ entry.review().id().value() }}/delete" class="delete-form">
<input type="hidden" name="redirect_after" value="/?offset={{ current_offset }}">
<input type="hidden" name="_csrf" value="{{ ctx.csrf_token }}">
<button type="submit">Delete</button>
</form>
{% endif %}