Skip to content

policy: skip invalid UTF-8 hostname normalization - #4142

Open
crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-policy-idna-test
Open

crazy-max wants to merge 1 commit into
docker:masterfrom
crazy-max:fix-policy-idna-test

Conversation

@crazy-max

@crazy-max crazy-max commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

fixes #4138

Remove the invalid UTF-8 hostname case from the normalization tests. IDNA's Unicode 15 tables normalize it to punycode, while the Unicode 17 tables selected by Go 1.27 reject it.

@tonistiigi tonistiigi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a point of verifying ambiguous behavior if we are not sure what any particular buildx instance does.

I think we should either just skip this case or add a test with 1.27 build tag and strict expected behavior.

IDNA's Unicode 15 tables normalize the invalid UTF-8 hostname to punycode,
while the Unicode 17 tables selected by Go 1.27 reject it. Remove this
version-dependent case from the normalization tests so they pass on both
toolchains without accepting ambiguous behavior.

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max force-pushed the fix-policy-idna-test branch from 4b13a0c to 00413ec Compare October 13, 2026 12:06
@crazy-max crazy-max changed the title policy: fix host normalization tests for Go 1.27 policy: skip invalid UTF-8 hostname normalization Oct 13, 2026
@crazy-max crazy-max mentioned this pull request Oct 13, 2026

This branch has not been deployed

No deployments
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