Skip to content

Commit f560c7b

Browse files
committed
Don't send InvoiceError on failed authentication
When an invoice or invoice request cannot be authenticated from an OffersContext, simply do not respond instead of sending an InvoiceError message. According to BOLT4, messages sent over a blinded path not intended for its use MUST be ignored.
1 parent 2a1b1c2 commit f560c7b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10536,10 +10536,7 @@ where
1053610536
},
1053710537
None => match invoice_request.verify(expanded_key, secp_ctx) {
1053810538
Ok(invoice_request) => invoice_request,
10539-
Err(()) => {
10540-
let error = Bolt12SemanticError::InvalidMetadata;
10541-
return responder.respond(OffersMessage::InvoiceError(error.into()));
10542-
},
10539+
Err(()) => return ResponseInstruction::NoResponse,
1054310540
},
1054410541
};
1054510542

@@ -10650,7 +10647,7 @@ where
1065010647
})
1065110648
}
1065210649
},
10653-
Err(()) => Err(InvoiceError::from_string("Unrecognized invoice".to_owned())),
10650+
Err(()) => return ResponseInstruction::NoResponse,
1065410651
};
1065510652

1065610653
match result {

0 commit comments

Comments
 (0)