-
Notifications
You must be signed in to change notification settings - Fork 136
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
Can a registrable domain or public suffix have a trailing dot? #693
Comments
Curious, why so? That is, I would think the PSL storage algorithm independent of the site processing algorithm, but is there a dependency?
Yes, I would expect it preserved, even if the storage format of the PSL is that all entries are implicitly relative to the root (i.e. presumed to have a trailing dot, even if not stored as such, nor reflected as a transformation in output) |
Well, one way of reading the above is that if you pass in |
Totally agree that there is an opportunity for wording clarification - I hope it doesn’t seem that I’m dismissive of the problem statement. And yes, I acknowledge that’s one way to read the algorithm. Another way to read it is that the rules are all relative to the root, therefore don’t need That is:
Or, put differently, the length of the eTLD in the input is |
For Chromium, https://source.chromium.org/chromium/chromium/src/+/main:net/base/registry_controlled_domains/registry_controlled_domain.cc;l=164;drc=a5294cd6f2db1e92c16c46e7aaa653ffdcc6d230 implements the above algorithm I described (as part of its PSL APIs) |
Thanks, so I think what we should do here is update the two caller algorithms in https://url.spec.whatwg.org/#host-miscellaneous to preserve a trailing dot in the input in the output. And on top of that we should at least add one example that illustrates trailing dot preservation and ideally also update the same site examples with one example to illustrate the mismatch. And after that follow-up on the parenthetical in OP. |
Normally
example.com.
andexample.com
are considered distinct origins, but https://github.com/publicsuffix/list/wiki/Format#formal-algorithm suggeststhey might be considered same-site? That seems wrong to me and I would expect a trailing dot to be preserved as we preserve it everywhere else.
Neither URL nor HTML has trailing dot examples so I'm not sure if we explicitly considered this before.
cc @mikewest @sleevi @valenting @achristensen07 @dnsguru
(If the trailing dot is indeed significant follow-up is needed in at least httpwg/http-extensions#1758 and Fetch's "
localhost
" check, which should then also consider "localhost.
".)The text was updated successfully, but these errors were encountered: