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
x/net/publicsuffix: EffectiveTLDPlusOne fails on *.s3.amazonaws.com #20059
Comments
A probably related issue is that the following domain |
Okay, so according to the comment @aviramst linked to
Then I guess the the original snippet shouldnt return "s3.amazonaws.com", but rather it should return the input "sub.s3.amazonaws.com", but not erroring. |
Is there any chance we could get an option to ignore privately-administered suffixes, or is that outside of the scope/purpose of this package? |
Change https://golang.org/cl/153737 mentions this issue: |
This problem cannot be reproduced with the latest version of golang.org/x/net/publicsuffix. The sample code outputs "OK sub.s3.amazonaws.com" which I think is correct given the rule
in the current PSL https://github.com/publicsuffix/list/blob/master/public_suffix_list.dat#L10760 I think the problem was fixed in the underlying public suffix list in commit 37e30d13801e but I'm not convinced that the expected output of publicsuffix.EffectiveTLDPlusOne("sub.s3.amazonaws.com") should be "amazonaws.com" as demanded by the bug report. With a rule like "s3.amazonaws.com" (or before commit 37e330) "*.s3.amazonaws.com" the answer can never be "amazonaws.com" |
I have moved on to other projects, but thanks for the update on this. I guess it can be closed then! |
@flowchartsman said:
I think the existing API lets you distinguish ICANN vs Private vs the catch-all * rule, as per https://go-review.googlesource.com/c/net/+/153737/4#message-d558a752d9467d474ac28d0fc6efa4ee687e49a7 |
As per the @vdobler and @martinlindhe conversation immediately above, I'm closing this issue. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8.1
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
Use the /x/net/publicsuffix to parse domain names using this;
running over a batch of hostnames, I noticed all "*.s3.amazonaws.com" gives the following error:
publicsuffix: cannot derive eTLD+1 for domain "sub.s3.amazonaws.com"
all other hostnames seems to work fine
What did you expect to see?
the sub.s3.amazonaws.com should successfully be parsed into "amazonaws.com" by publicsuffix.EffectiveTLDPlusOne()
What did you see instead?
the error described above
The text was updated successfully, but these errors were encountered: