Skip to content

decode punycode public suffixes in PublicSuffixMatcher.verify - #876

Open
dxbjavid wants to merge 1 commit into
apache:masterfrom
dxbjavid:psl-verify-idn-normalise
Open

decode punycode public suffixes in PublicSuffixMatcher.verify#876
dxbjavid wants to merge 1 commit into
apache:masterfrom
dxbjavid:psl-verify-idn-normalise

Conversation

@dxbjavid

Copy link
Copy Markdown
Contributor

PublicSuffixMatcher.verify (through verifyInternal) resolves the domain against the suffix rules without the normalisation and punycode decoding that getDomainRoot and matches already apply, and the bundled list holds IDN suffixes in their Unicode form. So an ACE-encoded public suffix such as xn--h-2fa.no matches no rule and verify returns true, which lets the cookie PublicSuffixDomainFilter treat a whole IDN TLD as a registrable domain and accept a supercookie scoped to it, even though matches recognises the same suffix correctly. This decodes and lowercases the input in verifyInternal the same way getDomainRoot does, so both the ACE and Unicode forms are rejected consistently while genuine registrable subdomains under an IDN suffix are still allowed.

@ok2c ok2c left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dxbjavid Could we pull the normalization logic up into #verify method and leave #verifyInternal as is under assumption its input is always normalized?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants