File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -707,16 +707,20 @@ async fn receive_files(
707707 node. start ( ) . await ?;
708708
709709 let listen_addr = node. listen_addr ( ) . await ?;
710+
711+ // Extract count before logging to avoid cleartext logging of sensitive trusted_peer_ids variable
712+ let trusted_peer_count = trusted_peer_ids. len ( ) ;
713+
710714 println ! ( "WRAITH Receive Mode" ) ;
711715 println ! ( "Version: {}" , env!( "CARGO_PKG_VERSION" ) ) ;
712716 println ! ( ) ;
713717 println ! ( "Node ID: {}" , hex:: encode( node. node_id( ) ) ) ;
714718 println ! ( "Listening on: {}" , listen_addr) ;
715719 println ! ( "Output directory: {}" , output. display( ) ) ;
716720 println ! ( "Auto-accept: {}" , auto_accept) ;
717- if !trusted_peer_ids . is_empty ( ) {
718- // Only log count, not actual peer IDs to avoid cleartext logging of trusted peers
719- println ! ( "Trusted peers: {} configured" , trusted_peer_ids . len ( ) ) ;
721+ if trusted_peer_count > 0 {
722+ // Log only the count, not actual peer IDs to avoid cleartext logging
723+ println ! ( "Trusted peers: {} configured" , trusted_peer_count ) ;
720724 }
721725 println ! ( ) ;
722726 println ! ( "Ready to receive files. Press Ctrl+C to stop" ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ rust-version = "1.88"
99[package .metadata ]
1010cargo-fuzz = true
1111
12+ # Empty workspace table indicates this package is not part of the parent workspace
13+ [workspace ]
14+
1215[dependencies ]
1316libfuzzer-sys = " 0.4"
1417arbitrary = { version = " 1.3" , features = [" derive" ] }
You can’t perform that action at this time.
0 commit comments