prevailing rule is *
This commit is contained in:
parent
619959db7a
commit
535751b6cc
|
@ -261,6 +261,9 @@ int psl_is_public(const psl_ctx_t *psl, const char *domain)
|
|||
if (rule) {
|
||||
// definitely a match, no matter if the found rule is a wildcard or not
|
||||
return 0;
|
||||
} else if (suffix.nlabels == 1) {
|
||||
// unknown TLD, this is the prevailing '*' match
|
||||
return 0;
|
||||
}
|
||||
|
||||
label_bak = suffix.label;
|
||||
|
|
|
@ -123,14 +123,6 @@ static void test_psl(void)
|
|||
if (*p > 0 && isupper(*p))
|
||||
*p = tolower(*p);
|
||||
|
||||
// there are test cases with 'example' unlisted TLD, unsure how to handle these, so skip for the moment
|
||||
{
|
||||
size_t len;
|
||||
|
||||
if ((len = strlen(domain)) >= 7 && !strcmp(domain + len - 7, "example"))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strcmp(expected_regdom, "null"))
|
||||
test(psl, domain, NULL);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue