Skip to content

Commit 8828e52

Browse files
committed
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.
1 parent b56c167 commit 8828e52

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/event.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,16 +1225,14 @@ where
12251225
);
12261226
log_info!(
12271227
self.logger,
1228-
"Successfully sent payment of {}msat{} from \
1229-
payment hash {:?} with preimage {:?}",
1228+
"Successfully sent payment of {}msat{} with payment hash {}",
12301229
amount_msat,
12311230
if let Some(fee) = fee_paid_msat {
12321231
format!(" (fee {} msat)", fee)
12331232
} else {
12341233
"".to_string()
12351234
},
12361235
hex_utils::to_string(&payment_hash.0),
1237-
hex_utils::to_string(&payment_preimage.0)
12381236
);
12391237
});
12401238
let event = Event::PaymentSuccessful {

0 commit comments

Comments
 (0)