tor_addr_port_lookup() is overly permissive

Like tor_addr_parse() in #23082 (moved), tor_addr_port_lookup() also allows square brackets around IPv4 addresses.

But it's slightly less permissive: it requires a terminating ].

For example, this command line should be rejected, but it is not:

tor ORPort [127.0.0.1]:9001
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information