Skip to content

fix(solid): refuse JSON-LD values the parser reads on past as errors - #831

Merged
ixuz merged 1 commit into
mainfrom
fix/json-ld-error-values-bounded
Nov 16, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/json-ld-error-values-bounded

Conversation

@ixuz

@ixuz ixuz commented Nov 15, 2026

Copy link
Copy Markdown
Member

What and why

The bound on the work a deck or release file in JSON-LD may take charged each value as much as a value in an exported file. Some values the parser reports as an error and then reads on past, such as an @id that is no string or an @included member that is no node object, take it far longer than a triple and make none, so a file of them within the bound could hold the tab long after its import had failed. A term defined as another term that aliases a keyword also named that keyword unseen by the checks.

refuseRemoteContexts now refuses such values up front, under an alias too, including the members of a @set object under the keyword it sits under, as the parser reads them. A context term defined as another term of the node's contexts is refused. The JSON-LD parse also writes the text one part per task and stops at its first error, so a failed parse leaves the main thread free after the part it failed in. Tests compare such files with an exported file at the same limits, until the main thread is free, and the data model and library pages describe the checks.

Refs: GHSA-c6fr-r6fm-4hjm

The bound on the work a deck or release file in JSON-LD may take
charged each value as much as a value in an exported file. Some values
the parser reports as an error and then reads on past, such as an @id
that is no string or an @included member that is no node object, take
it far longer than a triple and make none, so a file of them within
the bound could hold the tab long after its import had failed. A term
defined as another term that aliases a keyword also named that keyword
unseen by the checks, so the values under it were counted as plain
literals.

refuseRemoteContexts now refuses such values up front, under an
alias too: a non-string @id or a second one in an object, a @type that
is no string or array of strings, an @index that is no string, a
@reverse that is no object or holds a keyword, an @included member
that is no node object, a @nest member that is no object or holds
@value or @id, and a @list beside any key but @index. The members of a
@set object, or of an array in it, count as the members of the keyword
it sits under, as the parser reads them. A context term defined as
another term of the node's contexts is refused, as one defined through
one already was. The JSON-LD parse also writes the text one part per
task and stops at its first error, so a failed parse leaves the main
thread free after the part it failed in. Tests compare the reported
files with an exported file at the same limits, until the main thread
is free, and the data model and library pages describe the checks.

Refs: GHSA-c6fr-r6fm-4hjm
@ixuz ixuz added the bug Something isn't working label Nov 15, 2026
@ixuz
ixuz enabled auto-merge November 15, 2026 23:46
@ixuz
ixuz added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 573fa99 Nov 16, 2026
53 checks passed
@ixuz
ixuz deleted the fix/json-ld-error-values-bounded branch November 16, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant