Skip to content

Conversation

davidvisiedo
Copy link
Contributor

Prevents recursive parsing of json schema when conditions like told in json-schema specification, point 8.3.1:

https://json-schema.org/latest/json-schema-core.html#rfc.section.8.3.1

"A schema MUST NOT be run into an infinite loop against a schema. For example, if two schemas "#alice" and "#bob" both have an "allOf" property that refers to the other, a naive validator might get stuck in an infinite recursive loop trying to validate the instance. Schemas SHOULD NOT make use of infinite recursive nesting like this; the behavior is undefined. "

…n json-schema specification, point 8.3.1:

https://json-schema.org/latest/json-schema-core.html#rfc.section.8.3.1

"A schema MUST NOT be run into an infinite loop against a schema. For example, if two schemas "#alice" and "#bob" both have an "allOf" property that refers to the other, a naive validator might get stuck in an infinite recursive loop trying to validate the instance. Schemas SHOULD NOT make use of infinite recursive nesting like this; the behavior is undefined. "
Copy link
Contributor

@BalloonWen BalloonWen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a map to record refParsingInProgress to avoid duplicate refs
looks good to me.

@stevehu stevehu merged commit 9ead708 into networknt:master Aug 7, 2019
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.

3 participants