#239 added check for right part of token exists; removed check for left part length

This commit is contained in:
Oleg A 2019-11-23 11:46:50 +03:00
parent 56662d6bd8
commit f5d008938f

View file

@ -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