Skip to content

policy: accept the Go 1.27 IDNA result for an invalid host - #4139

Closed
SashaMIT wants to merge 1 commit into
docker:masterfrom
SashaMIT:fix/idna-go127-host
Closed

SashaMIT wants to merge 1 commit into
docker:masterfrom
SashaMIT:fix/idna-go127-host

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Oct 11, 2026 •

Copy link
Copy Markdown

Go 1.27 builds golang.org/x/net/idna with the Unicode 17 tables. Those tables reject invalid UTF-8. The Unicode 15 tables encoded \x94 as U+FFFD, so TestNormalizeHTTPHost expected xn--zn7c.example.com. On Go 1.27, normalizeHTTPHost returns idna: invalid label wrapped as invalid http host.

The case now lives in two tests with the same build tags as the IDNA tables. Go 1.26 still expects the punycode. Go 1.27 expects the error.

Before the change, GOTOOLCHAIN=go1.27.2 go test -mod=vendor -count=1 -run 'TestNormalizeHTTPHost$' ./policy failed on the \x94.EXAMPLE.COM case. After it, that run passes, and go test -mod=vendor -count=1 ./policy passes on Go 1.26.5.

Fixes #4138.

Go 1.27 ships Unicode 17 IDNA tables, which reject an invalid UTF-8
label. \x94.EXAMPLE.COM no longer becomes xn--zn7c.example.com.
normalizeHTTPHost already returns that error. The test follows the
toolchain the tables were built for.

Fixes docker#4138.

Signed-off-by: Sasha Mitchell <sash.t.mitchell@gmail.com>
@crazy-max

Copy link
Copy Markdown
Member

I'm going to close this PR because the activity from this account raises concerns about automated PR farming. At the time of writing, GitHub shows 1,092 authored PRs, including 20 opened today (October 12). The latest ten were opened across ten different repositories in under five hours, covering unrelated changes to cryptography, terminal rendering, caching, XPath, and PDF generation. Examples include ProtonMail/go-crypto#338, charmbracelet/lipgloss#759, and antchfx/xpath#158.

That doesn't prove the account is a bot, but the volume and pattern are concerning enough that I'm not comfortable merging this contribution. I'll investigate #4138 independently and follow up with a fix under my own account.

If I've misread the situation, please reach out and explain how you're personally reviewing and validating these contributions. I'm open to correcting my judgment.

@SashaMIT

Copy link
Copy Markdown
Author

Hey Crazy Max, I left a comment on other PR, I'm real but your right in I'm directing surplus compute with my system to OSS projects, so there is sudden spikes in PRs, it's not to be malicious, so my apologies and I can stop directing your way if preferred

In work I have multiple Cursor accounts and whilst using with API quota, I end up with surplus in Grok 4.7 quota, if not used it's a waste imo, we have a codered security system built for internal company work so i just point it to interesting OSS projects, I am here an present and managing over it and checking, but my agent is also quite aggressive in working through PRs and our orchestrator feedback loops

Hope this helps on transparency, and if wish to merge yourself or give any feedback (if not helpful or anything i can point towards) that's also no problem too, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TestNormalizeHTTPHost fails with Go 1.27

2 participants