From: Valentine Wallace Date: Tue, 12 Dec 2023 23:42:38 +0000 (-0500) Subject: Add missing keysend preimage check on inbound onion read. X-Git-Tag: v0.0.119~9^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=6b66271acfdd0e3963ee0b112cd0d9aecd76ca11;p=rust-lightning Add missing keysend preimage check on inbound onion read. --- diff --git a/lightning/src/ln/msgs.rs b/lightning/src/ln/msgs.rs index 6c4a324a9..689058c7e 100644 --- a/lightning/src/ln/msgs.rs +++ b/lightning/src/ln/msgs.rs @@ -2362,7 +2362,9 @@ impl ReadableArgs<(Option, &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;