tordam

A library for peer discovery inside the Tor network
git clone https://git.parazyd.org/tordam
Log | Files | Refs | README | LICENSE

commit 0f0605f030c2ebc2b6a447c43121b3101ec15e29
parent f96079f9d2e09d9c550df70a2e9c788b858bbbed
Author: parazyd <parazyd@dyne.org>
Date:   Mon,  8 Mar 2021 01:58:54 +0100

peer_announce: Validate onionaddr from param in Announce.

Diffstat:
Mpeer_announce.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/peer_announce.go b/peer_announce.go @@ -35,6 +35,10 @@ import ( func Announce(onionaddr string) error { log.Println("Announcing to", onionaddr) + if err := ValidateOnionInternal(onionaddr); err != nil { + return err + } + socks, err := proxy.SOCKS5("tcp", Cfg.TorAddr.String(), nil, proxy.Direct) if err != nil { return err