From ce4b4a55309c61dff3057c71a23e0e51df21d32c Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Mon, 23 Jun 2025 12:10:19 +0200 Subject: [PATCH] relax hardening: don't block lookup calls without payment_hash or invoice --- tasks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks.py b/tasks.py index d06a80f..5749751 100644 --- a/tasks.py +++ b/tasks.py @@ -323,8 +323,10 @@ async def _on_lookup_invoice( payment_hash = invoice_data.payment_hash # hardening # - assert_valid_sha256(payment_hash) - assert_valid_bolt11(invoice) + if payment_hash: + assert_valid_sha256(payment_hash) + if invoice: + assert_valid_bolt11(invoice) # ## # # Get payment data