Skip to content

More hostname label separator tests #776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

davishmcclurg
Copy link
Contributor

My implementation doesn't yet support all idn-hostname label separators properly, but (for multiple reasons) it is still passing the tests added here: #760

These are the tests I came up with while fixing/reproducing the issues.

These are mostly meant to test that the additional `idn-hostname` label
separators are treated like `.` and are only allowed between labels.
Regular `hostname` should not support the extended label separators used
in `idn-hostname`.
This tests that the extended label separators used in `idn-hostname`
properly validate individual labels and don't treat the whole instance
as a single label.
@davishmcclurg davishmcclurg requested a review from a team as a code owner June 16, 2025 00:20
@karenetheridge
Copy link
Member

A lot of these fail in my implementation (they show as valid where the test says it's invalid), but that likely just means I need to mark these as TODO, due to a gap in the library I'm using.

@davishmcclurg
Copy link
Contributor Author

Looking at the IDNA specifications some more, it's unclear if the extended set of label separators is included in RFC 5890. The only reference I can find is in an appendix of RFC 5891 ("Summary of Major Changes from IDNA2003" (RFC 3490)):

Remove the dot separator from the mandatory part of the protocol.

Not sure what that means.

They're in RFC 3490 (as noted in #760), but I don't know how relevant that is since JSON schema uses 5890 for idn-hostname.

They're also included in Unicode technical standard 46, which references both IDNA versions. 🤷

Leading/trailing separators are similarly confusing.

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.

2 participants