From 3e3bd243bd2d458db417470ef7f4a080343dac6c Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 3 Oct 2025 18:55:33 +0200 Subject: [PATCH] Look up by user and not the ever changing encrypted token, whoops! --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index ad88a8d..3e09125 100644 --- a/main.py +++ b/main.py @@ -82,7 +82,7 @@ def register_token( cursor = db.cursor() cursor.execute( "SELECT * FROM device_tokens WHERE user_id=%s AND hashed_token=%s", - (secure_token,hashed_token)) + (user_id,hashed_token)) existing = cursor.fetchone() if existing: