mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
#239 added check for right part of token exists; removed check for left part length
This commit is contained in:
parent
56662d6bd8
commit
f5d008938f
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ def check_token(token: str) -> bool:
|
|||
raise exceptions.ValidationError('Token is invalid!')
|
||||
|
||||
left, sep, right = token.partition(':')
|
||||
if (not sep) or (not left.isdigit()) or (len(left) < 3):
|
||||
if (not sep) or (not left.isdigit()) or (not right):
|
||||
raise exceptions.ValidationError('Token is invalid!')
|
||||
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue