From 1331afa4da8149d4eb7bf5ccaf4a2854b6c3b85a Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Wed, 29 Jul 2026 13:40:17 +0200 Subject: [PATCH] Fix of hexdigest --- Web/push_notifications.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/push_notifications.py b/Web/push_notifications.py index 5c50f9c..6e3fa1e 100644 --- a/Web/push_notifications.py +++ b/Web/push_notifications.py @@ -142,7 +142,7 @@ def save_push_subscription(username, subscription_obj): # Create unique hash of subscription using plaintext data to avoid duplicates sub_hash = hashlib.shake_256( f"{username}:{endpoint}".encode('utf-8') - ).hexdigest() + ).hexdigest(32) # Check if subscription already exists by Hash existing = subs_col.find_one({ @@ -197,7 +197,7 @@ def remove_push_subscription(username, endpoint): sub_hash = hashlib.shake_256( f"{username}:{endpoint}".encode('utf-8') - ).hexdigest() + ).hexdigest(32) result = subs_col.update_one( {'SubscriptionHash': sub_hash},