From 6e483de51f9169e9a6c42b0ed68cab6796ec57ac Mon Sep 17 00:00:00 2001 From: altaf-creator Date: Tue, 2 Dec 2025 16:51:32 +0700 Subject: oops --- backend/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/main.py') 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: -- cgit v1.2.3