HomeSource World

eth, p2p: use truncated names (#21698)

Description

eth, p2p: use truncated names (#21698)

  • peer: return localAddr instead of name to prevent spam

We currently use the name (which can be freely set by the peer) in several log messages.
This enables malicious actors to write spam into your geth log.
This commit returns the localAddr instead of the freely settable name.

  • p2p: reduce usage of peer.Name in warn messages
  • eth, p2p: use truncated names
  • Update peer.go

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>

Details

Provenance
Martin Holst Swende <martin@swende.se>Authored on Oct 13 2020, 11:28 AM
GitHub <noreply@github.com>Committed on Oct 13 2020, 11:28 AM
Parents
rGETH5c6155f9f49b: internal/web3ext: improve some web3 apis (#21639)
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGETH7a5a822905d9: eth, p2p: use truncated names (#21698) (authored by Martin Holst Swende <martin@swende.se>).Oct 13 2020, 11:28 AM