From 7a41c14167b3e31b2c5786c4da7b1e60720ac59a Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 26 Oct 2019 11:29:50 +0200 Subject: [PATCH] Enable Flask permanent session for the admin sessions --- blueprints/admin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blueprints/admin.py b/blueprints/admin.py index ec9642d..223da82 100644 --- a/blueprints/admin.py +++ b/blueprints/admin.py @@ -90,6 +90,7 @@ def admin_login() -> _Response: pwd = request.form.get("pass") if pwd: if verify_pass(pwd): + session.permanent = True session["logged_in"] = True return redirect( request.args.get("redirect") or url_for("admin.admin_notifications") @@ -108,6 +109,7 @@ def admin_login() -> _Response: finally: session["challenge"] = None + session.permanent = True session["logged_in"] = True return redirect( request.args.get("redirect") or url_for("admin.admin_notifications")