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

suffixList.isRegistrable("bad.bad") returns true #9

Open kamal2311 opened 8 years ago

kamal2311 commented 8 years ago

suffixList.isRegistrable("bad.bad") returns true -> though bad is not in the suffix list suffixList.isRegistrable("co m") returns true -> though co m is invalid altogether.

Can you please check?

malkusch commented 8 years ago

bad is not in the suffix list

It is implicit. Check the PSL algorithm:

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

co m is invalid altogether.

Yeah, this is a similar issue like #8.

idelpivnitskiy commented 7 years ago

@malkusch Yes, according to the PSL algorithm it's correct. But one of the most useful features is to check is the TLD in the PSL or not. What about introducing a separate method or param, which will exclude wildcard from the rules?