karenetheridge / JSON-Schema-Modern

Validate data against a schema using a JSON Schema
https://metacpan.org/release/JSON-Schema-Modern/
Other
10 stars 1 forks source link

infinite recursion detection #8

Closed karenetheridge closed 4 years ago

karenetheridge commented 4 years ago

https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.8.2.4.3

karenetheridge commented 4 years ago

This was solved by having a stack depth limitation (defaulting to 50), but we could do an even better job by checking for duplicate (instanceLocation, absoluteKeywordLocation) tuples, which will work at any stack depth be it 2 or 200000000.

karenetheridge commented 4 years ago

..and I have done so, via commit 09685ef7c (v0.011).