feat(webui): add csrf tokens to all forms processing code
All checks were successful
main / main (push) Successful in 1m59s
main / deploy (push) Has been skipped
main / publish (push) Has been skipped

Closes #60
This commit is contained in:
Julien Dessaux 2025-05-01 08:37:28 +02:00
parent 895615ad6e
commit 5d7b540718
Signed by: adyxax
GPG key ID: F92E51B86E07177E
15 changed files with 71 additions and 2 deletions

View file

@ -9,6 +9,7 @@
</div>
{{ if .Page.Session.Data.Account.IsAdmin }}
<form action="/accounts" enctype="multipart/form-data" method="post">
<input name="csrf_token" type="hidden" value="{{ .Page.Session.Data.CsrfToken }}">
<fieldset>
<legend>New User Account</legend>
<div class="grid-2">
@ -40,6 +41,7 @@
{{ end }}
<div style="align-self:stretch; display:flex; justify-content:flex-end;">
<button class="primary" type="submit" value="submit">Create User Account</button>
</div>
</fieldset>
</form>
{{ end }}