Repository navigation
Conversation
The fast path marks com, org, edu, gov, net and de as ICANN suffixes but only checked allowPrivateDomains, so allowIcannDomains: false still reported isIcann: true for those hosts.
Owner
|
Hi @youdie006, and thanks for your contribution. Out of curiosity, is there a use-case for disabling both private domains and ICANN domains? |
Author
|
Not one I've seen in practice. I found this while reading With both off no rules apply, so every hostname falls back to its last label ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fast-path.tsanswers com, org, edu, gov, net and de directly and marks themisIcann: true, but it only checksallowPrivateDomains, notallowIcannDomains. So with{ allowIcannDomains: false }and private domains left off,example.comreportsisIcann: truewhileexample.frandexample.co.ukreportfalse. The trie lookups in tldts and tldts-experimental both skip ICANN rules when the option is off.The fast path now also requires
allowIcannDomains, so only this option combination falls through to the regular lookup;publicSuffix,domainandsubdomaindon't change, and default options still take the fast path. In tldts-icann the two flags becomenullfor these hosts, as they already are there forfrandco.uk. The new test sits next to the existing wildcard fallback test and runs for all three builds.After
yarn build,yarn testpasses in every package (on master the new test fails in tldts, tldts-experimental and tldts-icann), andyarn lintand prettier are clean.Written with AI assistance (Claude); I have reviewed the change.