diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-12-02 16:51:32 +0700 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-12-02 16:51:32 +0700 |
| commit | 6e483de51f9169e9a6c42b0ed68cab6796ec57ac (patch) | |
| tree | 23cc4d03ace24aacf4985acdff924d58e6889717 /backend/main.py | |
| parent | 762071263d5171be26d753f8f1b157e28cd6bbd6 (diff) | |
oops
Diffstat (limited to 'backend/main.py')
| -rw-r--r-- | backend/main.py | 4 |
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: |
