I just double checked that it still errors for double trailing dots. For everything parsed with parse_domain the check in line 668 catches it. For parse_dns_name the to_ascii method errors with a TooShortForDns.
It might make sense to replace the ? with a chain_err and also convert it into InvalidDomain, but thats a different issue.
Domain::find_match miscounts the labels as being 2, if there is a single label with a trailing dot causing an index out of range panic.
Fixes https://github.com/rushmorem/publicsuffix/issues/8
I just double checked that it still errors for double trailing dots. For everything parsed with
parse_domain
the check in line 668 catches it. Forparse_dns_name
theto_ascii
method errors with aTooShortForDns
.It might make sense to replace the
?
with achain_err
and also convert it intoInvalidDomain
, but thats a different issue.