From 2883733d294d86541a7f9253d0f8bc3ff56ff8c9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 8 Nov 2023 14:36:56 +0100 Subject: 🐛 Password expiration: delete cache after password reset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 2a60bfd6a..2ab7e970d 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -203,8 +203,8 @@ def update_password_last_update(user): return ishtar_user.password_last_update = datetime.date.today() ishtar_user.save() - key = f"{settings.PROJECT_SLUG}-password_expired-{ishtar_user.pk}" - cache.set(key, False, settings.CACHE_TIMEOUT) + key = f"{settings.PROJECT_SLUG}-password_expired-{user.pk}" + cache.delete(key) class PasswordChangeView(auth_view.PasswordChangeView): -- cgit v1.2.3