Spaces:
Running
Running
Update utils/login.py
Browse files- utils/login.py +3 -1
utils/login.py
CHANGED
@@ -8,7 +8,9 @@ def hash_password(access_code):
|
|
8 |
|
9 |
|
10 |
def login(access_code):
|
11 |
-
|
|
|
|
|
12 |
with open("hashed_codes.txt") as file:
|
13 |
for line in file:
|
14 |
if hashed_code in line:
|
|
|
8 |
|
9 |
|
10 |
def login(access_code):
|
11 |
+
if access_code is None:
|
12 |
+
return False
|
13 |
+
hashed_code = hash_password(access_code.replace(" ", ""))
|
14 |
with open("hashed_codes.txt") as file:
|
15 |
for line in file:
|
16 |
if hashed_code in line:
|