whois-server-list / public-suffix-list

Java API for Mozilla's Public Suffix List
Do What The F*ck You Want To Public License
47 stars 14 forks source link

Default rule "*" includes everything else. Fails to validate bogus .bad tld as a public suffix. #5

Closed fooinha closed 9 years ago

fooinha commented 9 years ago

Hi,

Sorry if I am not seeing this correctly, but by having the default rule ("*") aren't we allowing any dummy or unknown .tld to be considered as a suffix? (public)

Is this library also supposed to be a public suffix validator? If so, shouldn't we use instead the "!*" rule (with exception) in order to match non valid suffixes?

PublicSuffixListFactory.java#L128

malkusch commented 9 years ago

but by having the default rule ("*") aren't we allowing any dummy or unknown .tld to be considered as a suffix?

Well, that's how the PSL is defined:

If no rules match, the prevailing rule is "*".

I do understand that any TLD is then considered a public suffix.

Is this library also supposed to be a public suffix validator?

The questions this library can answer are:

Yes, it is then. But I guess if you are not happy with that behaviour you should knock at PSL directly.