test(format/uri): add strict anchoring, spacing, and delimiter validation cases#955
Open
AcEKaycgR wants to merge 1 commit into
Open
test(format/uri): add strict anchoring, spacing, and delimiter validation cases#955AcEKaycgR wants to merge 1 commit into
AcEKaycgR wants to merge 1 commit into
Conversation
ea3badc to
8b782fa
Compare
jviotti
reviewed
Jun 29, 2026
| }, | ||
| { | ||
| "description": "close brace is invalid in path", | ||
| "data": "http://a.com/}", |
Member
There was a problem hiding this comment.
This seems very similar to the one in line 165?
Contributor
Author
There was a problem hiding this comment.
Good catch and thank you I've removed the redundant "close brace is invalid in path" test case since it is already covered by the existing {} test on line 165.
jviotti
approved these changes
Jun 29, 2026
jviotti
left a comment
Member
There was a problem hiding this comment.
Looks good to me, though there is one test I commented on that I think is already well covered by the rest?
8b782fa to
3c99b30
Compare
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.
Applies to: draft-v1, draft-04, draft-06, draft-07, draft/2019-09, draft/2020-12
Adds 9 new cases validating strict string anchoring constraints, disallowed whitespace characters (newlines, spaces), and invalid path/authority delimiters for the
uriformat.Added:
}inside path (invalid){inside query (invalid){inside fragment (invalid)@signs in authority (invalid)Ecosystem Impact (Triangulation):
Under Bowtie verification against 8 active implementations, these cases successfully caught live compliance issues:
php-opis-json-schemaincorrectly accepts trailing newlines ("http://a.com\n") and embedded newlines ("http://a\n.com") as valid.go-gojsonschemaincorrectly accepts spaces in query ("?a b") and fragment ("#a b").go-gojsonschemaincorrectly accepts invalid braces ({and}) in path, query, and fragment.go-gojsonschemaincorrectly accepts multiple@signs in authority ("http://user@pass@a.com").@jviotti @jdesrosiers @karenetheridge Ready for review.