Repository navigation
Treat the parent of a wildcard rule as a public suffix - #2752
Merged
Merged
Conversation
- Root cause: tldts followed the PSL wiki's literal algorithm, where `*.kobe.jp`
does not match `kobe.jp`: `getDomain('kobe.jp')` returned `kobe.jp`. Chromium,
Firefox, libpsl, the PSL linter and tldts-experimental all treat `*.p` as
implying `p` (publicsuffix/list#694), so tldts disagreed with browsers and
with tldts-experimental on 292 hosts.
- Fix (build time only): the parent of `*` gets the `*` rule's flag unless it
already has one. Lookup code unchanged; tldts and tldts-icann data change.
- Behaviour change: those 292 hosts become public suffixes (`parse()` returns
the host as `publicSuffix`, `domain` null); bare wildcard TLDs such as `er`
are now reported as ICANN.
- Tests: wildcard parents in all option modes, builder tests, and a PSL check
that fails if a node ever gets conflicting rule types or an exception sits
under its own wildcard.
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.
*.kobe.jpdoes not matchkobe.jp:getDomain('kobe.jp')returnedkobe.jp. Chromium, Firefox, libpsl, the PSL linter and tldts-experimental all treat*.pas implyingp(The spec doesn't seem clear on how to handle "incomplete" hostnames publicsuffix/list#694), so tldts disagreed with browsers and with tldts-experimental on 292 hosts.*gets the*rule's flag unless it already has one. Lookup code unchanged; tldts and tldts-icann data change.parse()returns the host aspublicSuffix,domainnull); bare wildcard TLDs such aserare now reported as ICANN.