Fix crash on attempted exploit of API server.
This commit is contained in:
parent
d4ce00a5fc
commit
98b9f097d0
@ -46,7 +46,7 @@ def before_request() -> None:
|
|||||||
authtype = None
|
authtype = None
|
||||||
authtoken = None
|
authtoken = None
|
||||||
|
|
||||||
if authtype.lower() == "token":
|
if authtype is not None and authtoken is not None and authtype.lower() == "token":
|
||||||
g.authorized = g.data.local.api.validate_client(authtoken)
|
g.authorized = g.data.local.api.validate_client(authtoken)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user