fix
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ async def get_current_user(
|
||||
if authorization is None or not authorization.startswith("Bearer "):
|
||||
raise ApiError(401, "unauthorized", "Требуется Bearer-сессия", BEARER_CHALLENGE)
|
||||
token = authorization[7:]
|
||||
if not token or token.strip() != token:
|
||||
if not token or not token.isascii() or token.strip() != token:
|
||||
raise ApiError(401, "unauthorized", "Требуется Bearer-сессия", BEARER_CHALLENGE)
|
||||
user = await store.user_for_token(token)
|
||||
if user is None:
|
||||
|
||||
Reference in New Issue
Block a user