You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IRIs containing %-encoded [ and ] characters incorrectly fail validation due to the following code in the IriFormat and IriReference introduced in #983:
if (query.indexOf('[') != -1 || query.indexOf(']') != -1) {
returnfalse;
}
}
uri.getQuery() decodes the query string, so this scenario fails validation even though [ and ] were correctly escaped. Potentially could use uri.getRawQuery() instead. This wasn't picked up in the original PR as there was no test case written that would pass when these characters were escaped, only that they were disallowed.
IRIs containing %-encoded
[
and]
characters incorrectly fail validation due to the following code in theIriFormat
andIriReference
introduced in #983:json-schema-validator/src/main/java/com/networknt/schema/format/IriReferenceFormat.java
Lines 17 to 23 in 7728325
uri.getQuery()
decodes the query string, so this scenario fails validation even though[
and]
were correctly escaped. Potentially could useuri.getRawQuery()
instead. This wasn't picked up in the original PR as there was no test case written that would pass when these characters were escaped, only that they were disallowed.Additional test case that demonstrates the issue:
Test file references:
The text was updated successfully, but these errors were encountered: