test(idn-hostname): reject fullwidth digits#927
Open
vtushar06 wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds test coverage to ensure idn-hostname rejects RFC 5892–disallowed fullwidth digits across multiple JSON Schema draft test suites.
Changes:
- Added a negative test case asserting fullwidth digits (U+FF11..U+FF13) are invalid for
idn-hostname. - Applied the same test addition to v1, draft7, draft2019-09, and draft2020-12 optional format suites.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/v1/format/idn-hostname.json | Adds invalid-case test for fullwidth digits in idn-hostname. |
| tests/draft7/optional/format/idn-hostname.json | Mirrors the new invalid-case test for draft7 optional formats. |
| tests/draft2019-09/optional/format/idn-hostname.json | Mirrors the new invalid-case test for draft2019-09 optional formats. |
| tests/draft2020-12/optional/format/idn-hostname.json | Mirrors the new invalid-case test for draft2020-12 optional formats. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jviotti
approved these changes
Jun 15, 2026
jviotti
left a comment
Member
There was a problem hiding this comment.
Awesome. Very interesting that some implementations fail on this!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following the methodology I used for ipv4 (#907) and the earlier idn-hostname tests, I read RFC 5892 section 2.6 and found the current idn-hostname.json has no test for fullwidth digits in a label.
Fullwidth digits U+FF11-U+FF13 have the DISALLOWED property under IDNA2008, so a label made of them is not a valid U-label. UTS46 processors map them to ASCII
123and accept; strict IDNA2008 rejects. This parallels the merged ipv4 fullwidth/astral digit test (#907).Changes
123(U+FF11 U+FF12 U+FF13) is invalid.Ecosystem Impact
is_idn_hostnamecallsidna.encode, which raises InvalidCodepoint on U+FF11.RFC References
Reproduction commands and the idn-hostname cross-implementation matrix are in my evidence repo: https://github.com/vtushar06/JSON-Schema-format-test-Evidence/blob/main/idn-hostname.md
Related: #965