Fix: Add CSRF token to login form and make auth conditional

- Added csrf_token hidden input to login.html for regular form POST
- Made @login_required conditional on auth.enabled setting so dashboard works without auth enabled
- Now supports both auth-enabled and auth-disabled modes
This commit is contained in:
Reditus committed 2026-05-14 09:48:00 +01:00
1 parent 9f56c3943e
commit 361c6fcf2f
2 files changed
+56 -52

No files matched your search

+1
View File
@@ -110,6 +110,7 @@
{% endwith %}
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="form-group">
<label for="username">Username</label>
<input type="text" id="username" name="username" required autofocus>