From 47733bacc844c25a7ce9a35a209e024d51bfc924 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 30 Dec 2020 10:19:02 +0000 Subject: [PATCH] Remove code to migrate cookie names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We added this code in https://github.com/alphagov/notifications-admin/pull/3371/files to account for Flask Login renaming its cookies. We wanted our apps to be compatible with the old and new names, so people didn’t get logged out when we rolled out the change. Now that all the cookies with the old names will have expired (some weekends have passed since March) we can remove this loop. --- app/__init__.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index ec0ce3771..a31ff244c 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -552,12 +552,6 @@ def make_session_permanent(): when you first log in/sign up/get invited/etc, but we do it just to be safe. For more reading, check here: https://stackoverflow.com/questions/34118093/flask-permanent-session-where-to-define-them """ - - # TODO: Remove this loop after a weekend, when all cookies have either run through this code or expired - for val in ['user_id', 'remember', 'remember_seconds']: - if val in session: - session[f'_{val}'] = session[val] - session.permanent = True