Skip to content

add prefix/suffix hyphen rejection for host label validation based on rfc1123#679

Open
wty-Bryant wants to merge 2 commits into
mainfrom
feat-fix-hostlabel-format
Open

add prefix/suffix hyphen rejection for host label validation based on rfc1123#679
wty-Bryant wants to merge 2 commits into
mainfrom
feat-fix-hostlabel-format

Conversation

@wty-Bryant

Copy link
Copy Markdown
Contributor

Currently IsValidHostLabel in endpoint rulesfn aligns with rfc1123 to check a host label:

  • contains 1-63 chars
  • only has alpha/numeric chars and hyphen

But rfc1123 and superior 952 require the first/last char to only be alpha/numeric, and our old validation ignores hyphen rejection for that. This pr just adds that check for endpoint level host label validation without changing bottom http check

Test: run go run ./internal/repotools/cmd/eachmodule -p . "go test ./... -run TestEndpointCase" under go v2 to make sure each service's endpoint test cases pass

@wty-Bryant wty-Bryant requested review from a team as code owners June 24, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant