-
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
Side effect of "default rule" on disallowed TLDs #570
Comments
So you think |
Hi Tim!
The .ZA suffix is not listed because it's not a registerable suffix. It would be there if it would be possible to register a name at the .ZA TLD. But the registry doesn't allow it. At the time being, this behavior is not properly reflected in the list. Assuming this is something we care. |
On 04/12/17 18:08, Simone Carletti wrote:
But does gli.za actually occur in the DNS? Presumably not, as you say the .za registry does not allow it. So really, the question here is: do we support the use case of using the public suffix list on arbitrary inputs, or do we only support the use case of determining the public suffix for a domain which is in the DNS? I know that some applications like to use the PSL to determine what is a domain and what is not. Chrome does this, I believe. I'm not sure if Firefox does (yet). Those uses would break in this scenario. |
.com is also not registrable but listed. That's the star rule in effect - it doesn't matter if you list a TLD or not. You can register And with the ca.za rule: libpsl has a tool called 'psl'. You can check / play with
|
@rockdaboot I think that's conflating two things
I see @weppos mentioned it, but explicitly from the
Part of this problem stems from the PSL being unioned with the ICANN Root Zone Database. If we wish to express the TLD-ness of something, having I think @weppos 's root issue comes down to uncertainty as to whether the PSL is meant to be a necessarily full reflection of the domain registration policies - that is, all that are valid 2LDs - or whether it's meant to be sufficient expression for clients to ensure cookies are appropriately scoped. I think I would prefer the latter, and thus an expression such as adding just |
While reviewing golang/go#22959 I noticed a potentially unwanted side effect that I was able to reproduce at least in my Go and Ruby libraries.
I would be interested to know from @gerv @sleevi @rockdaboot if you have any feedback and if you believe this is an implementation issue, or a list issue.
Here's the issue: when a TLD is disallowed but instead we list third-level zones, the If no rules match, the prevailing rule is "*" instruction (see Algorithm) would cause incorrect results.**
Here's an example:
Note
.za
is not present as disallowed. When searching for e.g. forgli.za
, according to the algorithm the lookup would return no rule, hence it fallbacks to*
. As a result,gli.za
would translate into being the domains. Likewise, if you supplyfoo.gli.za
, the domain would begli.za
and subdomainfoo
.Of course, this doesn't apply if you try to parse any name containing one of the other explicitly hosted suffixes:
In other words, we are missing a way to tell the parser that
.za
is not a valid suffix. Actually, we do have a way which is the wildcard. In fact, the following change would word potentially tell the parser that.za
is invalid (as it will find a match according to the suggested algorithm, but it will disallow the name because of the wildcard).However, this is a sort of hack, with the side effect of causing
gli.za
to be considered a valid suffix despite not being explicitly listed. In the other words, we solve the problem with.za
, but we create another potential parsing issue.Funny enough, adding
!za
seems to change the behavior as expected, at least in my implementations. This is totally unexpected (we document ! to be an exception to a wildcard), hence I'm not sure whether this should be the solution unless we document it as such,Note that if you ignore the
*
rule, then you are safe. Which is also a possible solution, as well as we document it properly. In fact, my implementations allow to skip the default rule so that you can exacly spot these cases. However, I recall this is not an option in some implementations (e.g. I recall a discussion of @rockdaboot with Daniel fromcurl
aslibpsl
doesn't seem to allow it).Long story short, I am accepting feedback about what we should change/document to make it more clear that in cases where we explicitly list all the third-level suffixes, we don't have the second level to be considered a valid suffix by mistake.
The text was updated successfully, but these errors were encountered: