Merge pull request #6 from riccardobl/fixhardn
Some checks failed
/ release (push) Has been cancelled
Tests / test (push) Has been cancelled
/ pullrequest (push) Has been cancelled

Relax hardening for lookup
This commit is contained in:
Vlad Stan 2025-06-25 18:54:38 +03:00 • committed by GitHub
commit 55d53208ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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