From 0d343a99a5a2e130d4cb27db64b68727d2094ff7 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 12 Apr 2026 18:16:15 +0200 Subject: [PATCH 1/2] signer: Use case-insensitive comparison for bolt11 invoice strings BOLT11 invoices use bech32 encoding which is case-insensitive per BIP173. Some implementations normalize to uppercase, causing the signer resolver to reject valid PreapproveInvoice requests when the invoice casing differs between the signer request and the context request. Co-Authored-By: Claude Opus 4.6 (1M context) --- libs/gl-client/src/signer/resolve.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/gl-client/src/signer/resolve.rs b/libs/gl-client/src/signer/resolve.rs index 6b94d29e0..4534c7099 100644 --- a/libs/gl-client/src/signer/resolve.rs +++ b/libs/gl-client/src/signer/resolve.rs @@ -93,16 +93,16 @@ impl Resolver { true } (Message::PreapproveInvoice(l), Request::Pay(r)) => { - l.invstring.0 == r.bolt11.as_bytes() + l.invstring.0.eq_ignore_ascii_case(r.bolt11.as_bytes()) } (Message::PreapproveInvoice(l), Request::PreApproveInvoice(r)) => { // Manually calling preapproveinvoice should // always be allowed. The bolt11 string have to // match. - l.invstring.0 == r.bolt11.as_bytes() + l.invstring.0.eq_ignore_ascii_case(r.bolt11.as_bytes()) } (Message::PreapproveInvoice(l), Request::TrampolinePay(r)) => { - l.invstring.0 == r.bolt11.as_bytes() + l.invstring.0.eq_ignore_ascii_case(r.bolt11.as_bytes()) } (_, _) => false, }; From a4c19b9af7593d3099a66857c2217a2a91725e73 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Sun, 12 Apr 2026 18:20:41 +0200 Subject: [PATCH 2/2] signer: Add changelog entry for case-insensitive invoice fix Co-Authored-By: Claude Opus 4.6 (1M context) --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52c343cd2..8ef683efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to the subprojects will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [Unreleased] + +### Fixed + + - Fixed signer rejecting valid `PreapproveInvoice` requests for uppercase bolt11 invoices by using case-insensitive comparison, matching the bech32 spec (BIP173). ([#698](https://github.com/Blockstream/greenlight/pull/698)) + ## [0.3.3] ### Changed