From 8828e52b8f066a512d62f5451efef550f644eb79 Mon Sep 17 00:00:00 2001 From: elnafateh Date: Sun, 9 Aug 2026 15:18:57 +0100 Subject: [PATCH] Stop logging payment preimages at INFO level Payment preimages are proof-of-payment and correlation material. The INFO log previously included the full preimage after a successful outbound payment, exposing it to log collectors and anyone with log access. Remove the preimage from the 'Successfully sent payment' log message in src/event.rs, retaining only the payment hash for diagnostics. The preimage remains accessible via the PaymentSuccessful event and payment store APIs. --- src/event.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/event.rs b/src/event.rs index 36c1d0589..8e6a98dc9 100644 --- a/src/event.rs +++ b/src/event.rs @@ -1225,8 +1225,7 @@ where ); log_info!( self.logger, - "Successfully sent payment of {}msat{} from \ - payment hash {:?} with preimage {:?}", + "Successfully sent payment of {}msat{} with payment hash {}", amount_msat, if let Some(fee) = fee_paid_msat { format!(" (fee {} msat)", fee) @@ -1234,7 +1233,6 @@ where "".to_string() }, hex_utils::to_string(&payment_hash.0), - hex_utils::to_string(&payment_preimage.0) ); }); let event = Event::PaymentSuccessful {