05/24 Fix bugs

This commit is contained in:
2026-05-24 17:27:45 -04:00
parent cd63d5a020
commit 136b0e5635
14 changed files with 158 additions and 68 deletions
+9
View File
@@ -31,6 +31,7 @@ def login():
else:
user = authenticate(username, password)
if user:
session.clear() # prevent session fixation
session.permanent = True
# Store a safe subset — never store the password hash in session
session["user"] = {
@@ -86,3 +87,11 @@ def change_password_view():
error = msg
return render_template("change_password.html", success=success, error=error)
@auth_bp.route("/ping")
@login_required
def ping():
"""Keep-alive endpoint for the session timeout warning in app.js."""
session.modified = True
return "", 204