From f44ff7d26149f14524afebec28aa41e9893c7ced Mon Sep 17 00:00:00 2001 From: Nigel Kukard Date: Sat, 18 Mar 2023 19:14:58 +0000 Subject: [PATCH] fix: fixed session clearing and let logout_user take care of cleanup It seems when logging in and logging out, then logging back in, setting the session timeout to 5 minutes, then waiting for expiry can cause a situation when using SQLA-based sessions which results in a NULL field in the database and causes a persistent 500 Internal Server Error. As per issue 1439 here is a fix found by @raunz. Resolves #1439. Tested for about 8 hours and tons and tons of expired sessions, could not reproduce with the fix applied. --- powerdnsadmin/routes/index.py | 1 - 1 file changed, 1 deletion(-) diff --git a/powerdnsadmin/routes/index.py b/powerdnsadmin/routes/index.py index a21ad31..19fd277 100644 --- a/powerdnsadmin/routes/index.py +++ b/powerdnsadmin/routes/index.py @@ -528,7 +528,6 @@ def clear_session(): session.pop('google_token', None) session.pop('authentication_type', None) session.pop('remote_user', None) - session.clear() logout_user()