Skip to content

Commit cdf803c

Browse files
committed
plugins/pay: revert removal of paying invoice without description.
It's still deprecated: we need the description since 1. This information is useful for any validation we want to do, such as the HSM, or runes. 2. We want this information in listpays so we can tell what we actually paid. 3. In general, we should never sign commitments to things we don't have! I expect to have this information about payments *whatever the frontend* is, which is why we deprecated (and then removed) this unintended use. The spec is pretty clear on this: BOLT #11: ``` A reader: ... - MUST check that the SHA2 256-bit hash in the `h` field exactly matches the hashed description. ``` However, neither BTCPayServer nor lnbits updated despite the long deprecation period, so revert 2afe7a1. Signed-off-by: Rusty Russell <[email protected]>
1 parent be8ed8c commit cdf803c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/pay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,7 +1067,7 @@ static struct command_result *json_pay(struct command *cmd,
10671067
* - MUST check that the SHA2 256-bit hash in the `h` field
10681068
* exactly matches the hashed description.
10691069
*/
1070-
if (!b11->description) {
1070+
if (!b11->description && !deprecated_apis) {
10711071
if (!b11->description_hash) {
10721072
return command_fail(cmd,
10731073
JSONRPC2_INVALID_PARAMS,

0 commit comments

Comments
 (0)