-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed as not planned
@ownthink Output of
Description
Go version
v0.43.0
Output of go env
in your module/workspace:
GOVERSION='go1.24.3'
What did you do?
package main import ( "fmt" "golang.org/x/net/publicsuffix" ) func main() { subdomain := "www.kaikou.city.yokohama.jp" domain, _ := publicsuffix.EffectiveTLDPlusOne(subdomain) suffix, icann := publicsuffix.PublicSuffix(domain) fmt.Println("subdomain", subdomain, "domain", domain, "suffix", suffix, "icann", icann) }
What did you see happen?
when I was using the publicsuffix library, I found that the suffix list contains *.yokohama.jp, !city.yokohama.jp and the jp suffix.
If I parse www.kaikou.city.yokohama.jp, the * wildcard should first match city.yokohama.jp as the suffix, but since !city.yokohama.jp excludes that suffix, the library returns yokohama.jp. However, yokohama.jp is not explicitly listed in the suffix list.
suffix yokohama.jp not in https://publicsuffix.org/list/public_suffix_list.dat
Could you confirm whether this issue occurs across all of the following lists?
*.ck
!www.ck
*.kawasaki.jp
!city.kawasaki.jp
*.kitakyushu.jp
!city.kitakyushu.jp
*.kobe.jp
!city.kobe.jp
*.nagoya.jp
!city.nagoya.jp
*.sapporo.jp
!city.sapporo.jp
*.sendai.jp
!city.sendai.jp
*.yokohama.jp
!city.yokohama.jp
sub.psl.hrsn.dev
*.wc.psl.hrsn.dev
!ignored.wc.psl.hrsn.dev
*.sub.wc.psl.hrsn.dev
!ignored.sub.wc.psl.hrsn.dev
What did you expect to see?
domain: yokohama.jp
suffix: jp
Metadata
Metadata
Assignees
Labels
No labels