mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
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.
This commit is contained in:
parent
c2a120eeef
commit
559daeb2ae
1 changed files with 2 additions and 5 deletions
|
@ -10719,10 +10719,7 @@ where
|
|||
},
|
||||
None => match invoice_request.verify_using_metadata(expanded_key, secp_ctx) {
|
||||
Ok(invoice_request) => invoice_request,
|
||||
Err(()) => {
|
||||
let error = Bolt12SemanticError::InvalidMetadata;
|
||||
return responder.respond(OffersMessage::InvoiceError(error.into()));
|
||||
},
|
||||
Err(()) => return ResponseInstruction::NoResponse,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -10833,7 +10830,7 @@ where
|
|||
})
|
||||
}
|
||||
},
|
||||
Err(()) => Err(InvoiceError::from_string("Unrecognized invoice".to_owned())),
|
||||
Err(()) => return ResponseInstruction::NoResponse,
|
||||
};
|
||||
|
||||
match result {
|
||||
|
|
Loading…
Add table
Reference in a new issue