diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py index 91481f3157..1ffbaa7ddd 100644 --- a/securedrop/source_app/main.py +++ b/securedrop/source_app/main.py @@ -67,6 +67,13 @@ def create(): # Issue 2386: don't log in on duplicates del session['codename'] + + # Issue 4361: Delete 'logged_in' if it's in the session + try: + del session['logged_in'] + except KeyError: + pass + abort(500) else: os.mkdir(current_app.storage.path(filesystem_id))