Skip to content

Commit ce4b4a5

Browse files
committed
relax hardening: don't block lookup calls without payment_hash or invoice
1 parent 3b4f6e4 commit ce4b4a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tasks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,10 @@ async def _on_lookup_invoice(
323323
payment_hash = invoice_data.payment_hash
324324

325325
# hardening #
326-
assert_valid_sha256(payment_hash)
327-
assert_valid_bolt11(invoice)
326+
if payment_hash:
327+
assert_valid_sha256(payment_hash)
328+
if invoice:
329+
assert_valid_bolt11(invoice)
328330
# ## #
329331

330332
# Get payment data

0 commit comments

Comments
 (0)