-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
What version of Go are you using (go version
)?
$ go version go version go1.19.3 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What did you do?
package main
import (
"fmt"
"golang.org/x/net/publicsuffix"
)
func main() {
fmt.Println(publicsuffix.EffectiveTLDPlusOne("foo.aivencloud.com"))
}
What did you expect to see?
foo.aivencloud.com <nil>
aivencloud.com
was indeed added to the Public Suffix List (PSL) as far back as February 24th 2022, i.e. much earlier than Go 1.19.3's release on November 1st 2022.
What did you see instead?
aivencloud.com <nil>
This undesired output can be explained be explained by the fact that file table.go
hasn't been regenerated with an up-to-date version of the PSL since November 2021, which predates the addition of aivencloud.com
to the PSL.
Why this matters
Of course, there's nothing specific about PSL entry aivencloud.com
. I just happened to play a small part in its addition. But it's an example of a PSL entry missing from the current version of golang.org/x/net/publicsuffix
.
The PSL is the foundation on which the modern concept of site is based. Go developers (I included) may depend on x/net/publicsuffix
in order to decide whether to establish a trust relationship between different Web origins. However, if x/net/publicsuffix
doesn't stay abreast of changes to the PSL (give or take a few weeks), it becomes somewhat undependable, as relying on it to make sensitive decisions may introduce security holes.
Is there a good reason why table.go
does not get regenerated at each minor release (or even, ideally, at each patch release) of Go? I'd be more than willing to help to make this happen.