add CSRF protection

This commit is contained in:
wiktr committed 2026-08-28 14:48:58 +02:00
1 parent 8b94f36db5
commit 37442c9864
5 files changed
+197 -121

No files matched your search

+4 -3
View File
@@ -14,9 +14,10 @@
{%endif%}
{%endwith%}
<form method="POST" action="/login">
<input type="text" name="user" placeholder="username" required autofocus /><br />
<input type="password" name="pass" placeholder="password" required /><br />
<form method="POST" action="/">
{{ login_form.hidden_tag() }}
{{ login_form.username(placeholder="Username", autofocus=True) }}<br />
{{ login_form.password(placeholder="Password") }}<br />
<button type="submit">log in</button>
</form>
</body>