From e55dc652ee5fc6bd34d3b5b9d76090c7aa548788 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 21 Aug 2022 21:06:33 +0200 Subject: [PATCH] Tweak inbox activity processing --- app/boxes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/boxes.py b/app/boxes.py index 495b38d..0b1d59c 100644 --- a/app/boxes.py +++ b/app/boxes.py @@ -1766,7 +1766,13 @@ async def save_to_inbox( ) forwarded_by_actor = await fetch_actor(db_session, sent_by_ap_actor_id) - if not (await ldsig.verify_signature(db_session, raw_object)): + is_sig_verified = False + try: + is_sig_verified = await ldsig.verify_signature(db_session, raw_object) + except Exception: + logger.exception("Failed to verify LD sig") + + if not is_sig_verified: logger.warning( f"Failed to verify LD sig, fetching remote object {raw_object_id}" )