rushmorem / publicsuffix

An implementation of Mozilla's Public Suffix List in Rust
MIT License
97 stars 17 forks source link

Why is domain that has a suffix that is not on the list returns true in `has_known_suffix` function? #27

Closed ivanceras closed 4 years ago

ivanceras commented 4 years ago

I couldn't find ae1 in the list, why does the domain type an Icann?

if let Ok(domain) = PUBLIC_SUFFIX_LIST.parse_domain(domain_name) {
        println!("domain: {:#?}", domain);
        if domain.has_known_suffix() {
            println!("Yes, this domain has a known suffix");
     }
}
domain: Domain {
    full: "co.ae1",
    typ: Some(
        Icann,
    ),
    suffix: Some(
        "ae1",
    ),
    registrable: Some(
        "co.ae1",
    ),
}
Yes, this domain has a known suffix
domain: Domain {
    full: "co.ae11",
    typ: Some(
        Icann,
    ),
    suffix: Some(
        "ae11",
    ),
    registrable: Some(
        "co.ae11",
    ),
}
Yes, this domain has a known suffix