arti-client: Change an XXXX to a TODO.

We _do_ reject bad hostnames: just not where I once thought we might.
We need to decide if the current behavior is what we want (and I think
it is, probably?).
This commit is contained in:
Nick Mathewson 2021-12-20 10:02:24 -05:00
parent a2afb29806
commit f73f6a4e80
1 changed files with 5 additions and 1 deletions

View File

@ -205,7 +205,11 @@ impl FromStr for Host {
if let Ok(ip_addr) = s.parse() {
Ok(Host::Ip(ip_addr))
} else {
// XXXX: reject bad hostnames.
// TODO(nickm): we might someday want to reject some kinds of bad
// hostnames here, rather than when we're about to connect to them.
// But that would be an API break, and maybe not what people want.
// Maybe instead we should have a method to check whether a hostname
// is "bad"? Not sure; we'll need to decide the right behavior here.
Ok(Host::Hostname(s.to_owned()))
}
}