From 98b836b96ecb5f3b1ac890145a5ffb4d6200efba Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Thu, 12 Aug 2021 18:59:43 +0000 Subject: [PATCH] Fix pin checking logic for frontend. --- bemani/frontend/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bemani/frontend/app.py b/bemani/frontend/app.py index 698ea17..26da53d 100644 --- a/bemani/frontend/app.py +++ b/bemani/frontend/app.py @@ -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