Fixed infinite recursion.
This commit is contained in:
parent
bdd603fb17
commit
6825b8bf74
@ -212,8 +212,14 @@ def force_logout_user():
|
||||
|
||||
from flask import g
|
||||
|
||||
flask_login.logout_user()
|
||||
g.current_user = flask_login.current_user._get_current_object()
|
||||
# Force the current user to be the anonymous user. Calling
|
||||
# flask_login.logout_user() here would cause infinite recursion, because
|
||||
# that calls _load_user(), which in turn tries to validate the current
|
||||
# token, which in turn starts by calling force_logout_user() just to be
|
||||
# safe.
|
||||
anon_user = AnonymousUser()
|
||||
flask_login.current_user = anon_user
|
||||
g.current_user = anon_user
|
||||
|
||||
|
||||
def get_blender_id_oauth_token():
|
||||
|
Loading…
x
Reference in New Issue
Block a user