From 2b0cd9d4de43a25ad4081656dbd2c8bff2cc4615 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 23 Dec 2021 21:17:29 +0200 Subject: [PATCH] fds --- files/__main__.py | 1 - files/routes/login.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/files/__main__.py b/files/__main__.py index 9c3b7a3fc..0137a5ea8 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -38,7 +38,6 @@ app.config['MAX_CONTENT_LENGTH'] = 8 * 1024 * 1024 app.config["SESSION_COOKIE_SECURE"] = True app.config["SESSION_COOKIE_SAMESITE"] = "Lax" app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 365 -app.config["SESSION_REFRESH_EACH_REQUEST"] = True app.config["SLOGAN"] = environ.get("SLOGAN", "").strip() app.config["DEFAULT_COLOR"] = environ.get("DEFAULT_COLOR", "ff0000").strip() app.config["DEFAULT_THEME"] = environ.get("DEFAULT_THEME", "midnight").strip() diff --git a/files/routes/login.py b/files/routes/login.py index da5910213..4e6b708c7 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -134,10 +134,10 @@ def login_post(): else: abort(400) + session.permanent = True session["session_id"] = token_hex(49) session["lo_user"] = account.id session["login_nonce"] = account.login_nonce - session.permanent = True check_for_alts(account.id) @@ -337,9 +337,9 @@ def sign_up_post(v): if "rama" in request.host: send_notification(new_user.id, WELCOME_MSG) + session.permanent = True session["session_id"] = token_hex(49) session["lo_user"] = new_user.id - session.permanent = True g.db.commit()