namecoin / heteronculous-horklump

Go port of Heteronculous (ptrace-based proxy leak detector). Outreachy project.
GNU General Public License v3.0
7 stars 3 forks source link

Avoid string split for address parsing #29

Closed JeremyRand closed 1 year ago

JeremyRand commented 1 year ago

In https://github.com/namecoin/heteronculous-horklump/blob/c934609549201d12c84a0a0aed87ff92783a8fd2/main.go#L265 , this makes me super nervous, since it will behave unexpectedly if that config variable is an IPv6 address. I realize that this function doesn't handle IPv6 yet anyway, but it still looks like an easy way to produce bugs. There should be dedicated functions in the Go standard library for parsing IP+port strings; we should use those.