Merge pull request #1383 from CTFd/fix-invalid-session-situation

* Fix an issue where session id no longer exists but the server thinks the user is still authed
This commit is contained in:
Kevin Chung
2020-05-05 22:18:31 -04:00
committed by GitHub

View File

@@ -202,7 +202,8 @@ def init_request_processors(app):
except (InvalidRequestError, IntegrityError):
db.session.rollback()
logout_user()
clear_user_recent_ips(user_id=session["id"])
else:
clear_user_recent_ips(user_id=session["id"])
@app.before_request
def banned():