summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/main.py b/backend/main.py
index d23a5d3..1eee95f 100644
--- a/backend/main.py
+++ b/backend/main.py
@@ -207,7 +207,7 @@ def create_session(response: fastapi.Response):
def authenticate_block(response: fastapi.Response, machine_id: str = None, block: int = None):
if machine_id:
- blk = URI_TO_MACHINES[machine_id][0]
+ blk = URI_TO_MACHINES[qr_uri[machine_id]][0]
response.set_cookie(key="auth_block", value=blk)
return blk
elif block:
@@ -249,7 +249,7 @@ def start_new_timer(data: RequestData, response: fastapi.Response, session_key:
return "invalid uri; you are unauthorised"
if auth_block:
- if auth_block != block:
+ if str(auth_block) != str(block):
response.status_code = fastapi.status.HTTP_403_FORBIDDEN
return "mismatch in block authentication cookie and requested block machine. forbidden."
else: