From 7ad592c4de1b86747bddea5331c3aada3c350dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Tue, 9 Apr 2024 15:45:47 +0200 Subject: [PATCH] fix: compatibility with old session IDs --- CHANGES.rst | 1 + canaille/app/flask.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4b526808..fb2cdf2a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ Added Fixed ^^^^^ - HTMX and JAVASCRIPT configuration settings. +- Compatibility with old sessions IDs. [0.0.49] - 2024-04-08 --------------------- diff --git a/canaille/app/flask.py b/canaille/app/flask.py index ee080474..153119dc 100644 --- a/canaille/app/flask.py +++ b/canaille/app/flask.py @@ -20,7 +20,7 @@ def current_user(): return g.user for user_id in session.get("user_id", [])[::-1]: - user = models.User.get(id=user_id) + user = models.User.get(user_id) if user and ( not current_app.backend.has_account_lockability() or not user.locked ):