Repository navigation
fix(solid): bound how deep a Turtle text may nest - #653
Merged
Merged
Conversation
The read limits held a Turtle text to its bytes, its triples and the characters of their terms. The parser makes the triple that links a nested collection, blank node, annotation or triple term to the level above it only once that level closes, and keeps a context for every level it is in. A text that only opened levels made no triple to count, so only its size bounded the memory the parse held, and a release or a foreign instance's document within the byte limit could use up the tab's memory. The scan that already looks through every Turtle text before the parser reads it, for its base and prefix declarations and long IRIs, now also counts the levels it opens and closes, past strings, IRIs and comments, and refuses a text nested more than 64 levels deep with a ReadLimitError, with limits or with none. Every Turtle read goes through it, on either client: pod documents, releases, profiles, access controls and deck files. The app's own documents and the library's releases nest a few levels. Refs: GHSA-qv47-r346-839c
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.
What and why
The read limits held a Turtle text to its bytes, its triples and the characters of their terms. The parser makes the triple that links a nested collection, blank node, annotation or triple term to the level above only once that level closes, and keeps a context for every open level. A text that only opened levels made no triple to count, so only its size bounded the memory the parse held.
ReadLimitError, with limits or with none.docs/deck-library.md,docs/data-model.md,docs/boundaries.mdanddocs/testing.md, and the doc comments that list what a read refuses, name the bound.Refs: GHSA-qv47-r346-839c