-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect PSL evaluation rules in the wiki regarding implicit wildcard rules #1989
Comments
Thanks @ko-zu!
Well, whether you can or cannot set a cookie on a public suffix is an issue for the browsers, so I'll translate "Cookies may NOT be set on ..." to "... is a public suffix." This is a known issue: #694 |
I'm not sure what your question is. https://github.com/publicsuffix/list/wiki/Format#algorithm states that So specific entries e.g. for bd are not necessary. This is useful because sometimes new TLDs are created but the PSL used e.g. in a users's browser doesn't get updated. Does that answer your question?
What assumption? Sorry, I'm not following here.
Indeed, that looks like a bug in the test cases. Since |
And indeed, by the algorithm given in the wiki - which is, as stated above, contentious and not the algorithm in browsers -
I don't have a particular opinion here. Is there any case when such inputs might actually occur? |
I understand. I think the wiki's rule is flawed because: If we strictly follow the wiki, The current wiki's rule requires
I think this is a bug in the wiki. #1998 should not alter the test case.
I believe this is a bug in the wiki. |
I don't understand your logic here. You're saying |
The wiki rule (incorrectly, I think) states that only |
I agree with you that the algorithm in the wiki says
While the first sentence on publicsuffix.org is
Why do you think it should be defined as a public suffix? You're basically saying you want the second algorithm and I would like to know why as input for #694. |
If you mean that any public suffix must allow its direct child domains to be registerable, I don't think so. Could you clarify your point if this is not what you meant? The bd TLD would be an example in this case. The children of bd (e.g., example.bd) are not allowed to be registered as declared by *.bd, but grandchildren (e.g., example2.example.bd) are allowed. However, the bd TLD is still considered a public suffix.
I think this sentence describes a possible situation, not an exhaustive definition. If one strictly follows this sentence as the only definition, then bd must not be a public suffix, and the TLD rule (implied * if absent) must be removed. That is against expectation. I believe a domain that is reserved to allocate some (or all) of its descendants (including direct children) for registrants is a sufficient condition, but not an exhaustive definition, for being a public suffix. It is not limited to this one criterion. The private section of a public suffix might have a different form of definition. Historical TLD use might have another exceptional rule. The reason I posted this issue was to resolve the conflicting rules between the wiki and the test case/linters. The self-contradictory definitions in this repository should be resolved either way. I believe the test case and linter are correct, supported by implementations and intended use cases. For the old issue, It seems some comments were concerned about existing implementations that do not follow the test case. I do not think this could be a reason to leave the conflicting rules. I believe it would be better to have one self-consistent rule in this repository and put a notice about the possible differences between implementations instead. If someone needs to follow a definition from a specific revision of the wiki, they can choose such an implementation regardless of what the current rule is. |
Hello,
I believe there is confusion regarding the wildcard evaluation rules in the wiki.
https://github.com/publicsuffix/list/wiki/Format
In the example,
This is incorrect. Cookies may NOT be set for
foo.com
. According to the linter,*.example.com
impliesexample.com
.https://github.com/publicsuffix/list/blame/de747b657fb0f479667015423c12f98fd47ebf1d/linter/pslint.py#L230
The current rules in the wiki states that the domain
example.com
does not match*.example.com
.However, some TLDs (e.g. *.bd) do not have explicit TLD declarations, which are required and checked by the linter.~~According to the wiki rules, we can set cookies on bd. This is not the expected behavior. ~~
kobe.jp
does have explicit public suffix declarations while*.kobe.jp
exists, which is required and checked by the linter. According to the wiki rules, we can set cookies onkobe.jp
. (Fixed to reflect simon-friedberger's comment. Thanks!)Implementations should assume
example.com
is also declared if*.example.com
exists.In the DNS world, this assumption is incorrect. However, the test data includes lines like:
While the PSL only has:
If we follow the wiki rules,
kobe.jp
should be on the right.Problems in the Wiki
The example above comes from the following evaluation rule definition:
According to this definition, the domain
example.com
cannot match*.example.com
because the domain has fewer labels than the listed rule.If we need to maintain this scheme, I believe we should add:
*
for the domain.Additionally, the statement "leading and trailing dots are ignored" is also incorrect. The test data explicitly disallows leading dot.
If you have write permission to the wiki, please take a look into the above issues.
Thank you.
The text was updated successfully, but these errors were encountered: