Add missing keysend preimage check on inbound onion read.

This commit is contained in:
Valentine Wallace 2023-12-12 18:42:38 -05:00
parent ecd8238592
commit 6b66271acf
No known key found for this signature in database
GPG key ID: FD3E106A2CE099B4

View file

@ -2362,7 +2362,9 @@ impl<NS: Deref> ReadableArgs<(Option<PublicKey>, &NS)> for InboundOnionPayload w
}
if let Some(blinding_point) = intro_node_blinding_point.or(update_add_blinding_point) {
if short_id.is_some() || payment_data.is_some() || payment_metadata.is_some() {
if short_id.is_some() || payment_data.is_some() || payment_metadata.is_some() ||
keysend_preimage.is_some()
{
return Err(DecodeError::InvalidValue)
}
let enc_tlvs = encrypted_tlvs_opt.ok_or(DecodeError::InvalidValue)?.0;