tor_addr_parse is overly permissive
tor_addr_parse allows these surprising address formats:
-
[192.0.2.1]
(IPv4 in square brackets) → 192.0.2.1 -
[11.22.33.44
(IPv4 with left square bracket only) → 11.22.33.4 -
[11:22::33:44
(IPv6 with left square bracket only) → 11:22::33:4 -
11:22::33:44:
(IPv6 with trailing colon) → 11:22::33:44