Closed bhood-zorus closed 2 years ago
What exactly do they want now? The library takes care of the validation and uses the rules of publicsuffix for that.
What exactly do they want now?
@tinohager I don't understand your question. Who is they? This issue is just to highlight that the public suffix list is not appropriate input data for TLD-parsing libraries such as this one.
okay thanks, then I will close the issue.
Shouldn't there at least be an update to the README of this repo to either remove the reference to the public suffix list or at least point out that using it can cause unexpected errors? It seems irresponsible to close this without acknowledging the problem.
I still don't understand what you are trying to tell me, we are using the public suffix list why would we remove the reference?
I don't know how much more clear I can make it for you. I've told you very concisely what the problem is twice now, and there's even example code in the first post.
The fact that you're using the public suffix list is the problem. When the public suffix list is used as the rule provider, this library produces invalid output. This is because the public suffix list is not a list of TLDs; using it as such is a mistake. The "Repro code" part of my first post clearly demonstrates this. By providing WebTldRuleProvider
and promoting its use, you are leading your users to failure.
The goal of this project is to provide a client for the "https://publicsuffix.org/" domain list. And you recommend me to stop using it in my project?
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 WebTldRuleProvider
is completely unfit for real world use. If you're okay with that, then I won't add any further comments to this issue.
Thank you you are welcome to use another project if this one does not meet your needs
I 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:
Console output: