From 6b66271acfdd0e3963ee0b112cd0d9aecd76ca11 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Tue, 12 Dec 2023 18:42:38 -0500 Subject: [PATCH] Add missing keysend preimage check on inbound onion read. --- lightning/src/ln/msgs.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5