Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions libs/gl-client/src/signer/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
Loading