mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-13 09:50:08 -04:00
Remove code to migrate cookie names
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user