Closed dead10ck closed 4 years ago
At the time of this writing, the public suffix list contains the rules
*.ck !www.ck
So with these rules e.g. foo.www.ck is an invalid domain because it does not have a valid suffix. However, the code produces this parse result:
foo.www.ck
[src/main.rs:46] list.parse_domain("foo.www.ck") = Ok( Domain { full: "foo.www.ck", typ: Some( Icann, ), suffix: Some( "ck", ), registrable: Some( "www.ck", ), }, )
which is incorrect, because ck is not a valid suffix on its own (it needs one label in front of it, and it can't be www).
ck
www
You see a similar issue with other exclusion rules, e.g.
[src/main.rs:46] list.parse_domain("foo.city.kawasaki.jp") = Ok( Domain { full: "foo.city.kawasaki.jp", typ: Some( Icann, ), suffix: Some( "kawasaki.jp", ), registrable: Some( "city.kawasaki.jp", ), }, )
It seems when evaluating exclusion rules, the code presently seems to just strip off the first label and say that's the suffix. If I'm not mistaken, the correct thing to do here is just return an error that indicates the input domain is invalid.
Sorry, please disregard this; I did not understand how the exclusion rules worked. I see you implemented the algorithm as described on the web page.
At the time of this writing, the public suffix list contains the rules
So with these rules e.g.
foo.www.ck
is an invalid domain because it does not have a valid suffix. However, the code produces this parse result:which is incorrect, because
ck
is not a valid suffix on its own (it needs one label in front of it, and it can't bewww
).You see a similar issue with other exclusion rules, e.g.
It seems when evaluating exclusion rules, the code presently seems to just strip off the first label and say that's the suffix. If I'm not mistaken, the correct thing to do here is just return an error that indicates the input domain is invalid.