relax hardening: don't block lookup calls without payment_hash or invoice
This commit is contained in:
parent
3b4f6e4c12
commit
ce4b4a5530
1 changed files with 4 additions and 2 deletions
2
tasks.py
2
tasks.py
|
|
@ -323,7 +323,9 @@ async def _on_lookup_invoice(
|
||||||
payment_hash = invoice_data.payment_hash
|
payment_hash = invoice_data.payment_hash
|
||||||
|
|
||||||
# hardening #
|
# hardening #
|
||||||
|
if payment_hash:
|
||||||
assert_valid_sha256(payment_hash)
|
assert_valid_sha256(payment_hash)
|
||||||
|
if invoice:
|
||||||
assert_valid_bolt11(invoice)
|
assert_valid_bolt11(invoice)
|
||||||
# ## #
|
# ## #
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue