mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-18 14:34:21 +01:00
Change expired session token error to be 401
This commit is contained in:
@@ -24,7 +24,7 @@ def get_current_user():
|
|||||||
if session_hash != hmac(user.password):
|
if session_hash != hmac(user.password):
|
||||||
logout_user()
|
logout_user()
|
||||||
if request.content_type == "application/json":
|
if request.content_type == "application/json":
|
||||||
error = 403
|
error = 401
|
||||||
else:
|
else:
|
||||||
error = redirect(url_for("auth.login", next=request.full_path))
|
error = redirect(url_for("auth.login", next=request.full_path))
|
||||||
abort(error)
|
abort(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user