Fix pin checking logic for frontend.
This commit is contained in:
parent
5708a2a785
commit
98b836b96e
@ -228,9 +228,9 @@ def valid_username(username: str) -> bool:
|
||||
|
||||
def valid_pin(pin: str, type: str) -> bool:
|
||||
if type == 'card':
|
||||
return re.match(r"\d\d\d\d", pin) is not None
|
||||
return re.match(r"^\d\d\d\d$", pin) is not None
|
||||
elif type == 'arcade':
|
||||
return re.match(r"\d\d\d\d\d\d\d\d", pin) is not None
|
||||
return re.match(r"^\d\d\d\d\d\d\d\d$", pin) is not None
|
||||
else:
|
||||
return False
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user