remove any old file upload data on sign in

if a user signs in again, clear their file upload data from any
aborted journeys from before, so that their cookies don't fill up

also add some temporary logging when the session starts getting full.
This commit is contained in:
Leo Hemsted
2018-04-03 14:43:38 +01:00
parent 98a40ac55b
commit 0dabd4ffc0
2 changed files with 11 additions and 0 deletions

View File

@@ -100,7 +100,9 @@ def log_in_user(user_id):
activated_user = user_api_client.activate_user(user)
login_user(activated_user)
finally:
# get rid of anything in the session that we don't expect to have been set during register/sign in flow
session.pop("user_details", None)
session.pop("file_uploads", None)
return redirect_when_logged_in(user_id)