Skip to content

Commit d21fde4

Browse files
authored
Merge pull request #105 from jagerman/bad-key-handling
Catch exception when blinding fails
2 parents 150d8ab + f037063 commit d21fde4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sogs/db.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,12 @@ def check_needs_blinding(dbconn):
218218
""",
219219
dbconn=dbconn,
220220
):
221-
pos_derived = crypto.compute_blinded_abs_id(sid)
221+
try:
222+
pos_derived = crypto.compute_blinded_abs_id(sid)
223+
except Exception as e:
224+
logging.warning(f"Failed to blind session_id {sid}: {e}")
225+
continue
226+
222227
query(
223228
'INSERT INTO needs_blinding (blinded_abs, "user") VALUES (:blinded, :uid)',
224229
blinded=pos_derived,

0 commit comments

Comments
 (0)