Public suffix list is misused, yielding incorrect results
See original GitHub issueI actually discovered this bug when using TldExtract and logged an issue in that repo. I’m posting the problem here as well because this library is (seemingly) actively maintained.
The problem is that the public suffix list is not a list of TLDs.
Repro code:
void Main()
{
try
{
var parser = new DomainParser(new WebTldRuleProvider());
Console.WriteLine(parser.Parse("https://s3.amazonaws.com"));
}
catch (Exception ex)
{
Console.WriteLine($"{ex.GetType().Name}: {ex.Message}");
}
}
Console output:
ParseException: Domain is a TLD according publicsuffix
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Download of public suffix list fails · Issue #1294 · win-acme ...
Hi I try to create a new certificate for a domain. First I tried the interactive UI where I chose "Create new certificate...
Read more >Public Suffix List
The Public Suffix List (PSL) is a catalog of certain Internet domain names. Entries on the list are also referred to as effective...
Read more >Learn more about the Public Suffix List
The Public Suffix List is a cross-vendor initiative to provide an accurate list of domain name suffixes, maintained by the hard work of...
Read more >draft-kucherawy-dmarc-base-13
Acquire a "public suffix" list, i.e., a list of DNS domain names reserved for ... DMARC evaluation can only yield a "pass" result...
Read more >draft-dmarc-base-00-03.txt
Construct a new DNS domain name using the name that matched from the public suffix list and prefixing to it the "x+1"th label...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you you are welcome to use another project if this one does not meet your needs
Your library is fundamentally flawed with the assumption that the public suffix list is a list of TLDs. I have provided a laughably trivial example that proves that
WebTldRuleProvideris completely unfit for real world use. If you’re okay with that, then I won’t add any further comments to this issue.