Skip to content

x/net/publicsuffix: Error is returned when getting eTLD+1 for s3.amazonaws.com #73385

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

Closed
Nadavrbn opened this issue Apr 15, 2025 · 3 comments
Closed
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@Nadavrbn
Copy link

Nadavrbn commented Apr 15, 2025

Go version

go version go1.24.2 darwin/arm64

Output of go env in your module/workspace:

AR='ar'
CC='cc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='c++'
GCCGO='gccgo'
GO111MODULE='on'
GOARCH='arm64'
GOARM64='v8.0'
GOAUTH='netrc'
GOBIN=''
GOCACHE='/Users/nadavrabinovich/Library/Caches/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/Users/nadavrabinovich/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/4y/k3g5jjxx05n9kh5pt_3pkf600000gn/T/go-build1151659047=/tmp/go-build -gno-record-gcc-switches -fno-common'
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMOD='/Users/nadavrabinovich/git/steps/steps/utils/infrastructure/pkg/go.mod'
GOMODCACHE='/Users/nadavrabinovich/.go/pkg/mod'
GONOPROXY='github.com/torqio,stackpulse.dev,torqio.dev'
GONOSUMDB='github.com/torqio,stackpulse.dev,torqio.dev'
GOOS='darwin'
GOPATH='/Users/nadavrabinovich/.go'
GOPRIVATE='github.com/torqio,stackpulse.dev,torqio.dev'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/opt/go/libexec'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/nadavrabinovich/Library/Application Support/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.24.2'
GOWORK=''
PKG_CONFIG='pkg-config'

What did you do?

I tried using publicsuffic.EffectiveTLDPlusOne method to get the base domain with the input "s3.amazonaws.com" and received an error:

publicsuffix: cannot derive eTLD+1 for domain "s3.amazonaws.com"

What did you see happen?

list.go line 173 extracts the suffix, but it returns the full domain, which causes the method to fail in the next line.

What did you expect to see?

I would expect the output to be "amazonaws.com"

@gopherbot gopherbot added this to the Unreleased milestone Apr 15, 2025
@prattmic prattmic added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 15, 2025
@prattmic
Copy link
Member

cc @neild

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 15, 2025
@seankhliao
Copy link
Member

I believe this is working as intended.
s3.amazonaws.com is an eTLD due to their legacy <bucket>.s3.amazonaws.com virtual hosted bucket urls.

This is the same as asking for the eTLD+1 of com, there's no plus one.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants