Skip to content

fix(solid): bound the reads of documents outside the user's storages - #673

Merged
ixuz merged 1 commit into
mainfrom
fix/foreign-deck-reads-budget
Nov 8, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/foreign-deck-reads-budget

Conversation

@ixuz

@ixuz ixuz commented Nov 8, 2026

Copy link
Copy Markdown
Member

What and why

An instance outside the user's storages could list many decks. The deck list then read every deck's cards and reviews documents at once, each held only to its own read limits, so nothing bounded the total and a large catalog could use up the tab's memory.

  • Reads outside the user's storages now count against a budget for the page session, on top of the limits on each document, the way reads of releases from a link already do. Reads as no one share one budget. An instance the user registered on another server has a budget for each server, so other reads never take from it. Only reads count: the user's writes go out whatever is spent. A read that goes past the budget names the budget in its error.
  • The deck arrangement refuses a catalog with more decks than MAX_CATALOG_LINKS, as the deck list already did.
  • Study counts are worked out a few decks at a time.
  • docs/boundaries.md and docs/data-model.md describe the budget.

Refs: GHSA-9q65-rfrp-5gj6

An instance outside the user's storages could list many decks, and the
deck list then read every deck's cards and reviews documents at once,
each held only to its own limits. Nothing bounded the total, so such a
catalog could take up the tab's memory.

Reads outside the user's storages now count in a budget for the page
session on top of the limits on each document, counted as the reads
of releases from a link are: a document once, by its largest read,
and reads of it again out of an allowance of their own. The reads as
no one share one budget, and an instance the user registered on
another server has one for each server, so reads elsewhere never take
from it. Past the budget, such reads fail with a read error until the
page is loaded again, and a read that goes past the budget names the
budget in its error, not the limits on each document. Writes are not
counted, so the user's writes to an instance they registered elsewhere
go out whatever is spent.

The deck arrangement refuses a catalog with more decks than
MAX_CATALOG_LINKS, as the deck list already did, and the study counts
are worked out a few decks at a time, whoever asks for them.

Refs: GHSA-9q65-rfrp-5gj6
@ixuz ixuz added the bug Something isn't working label Nov 8, 2026
@ixuz
ixuz added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 66d8c12 Nov 8, 2026
51 checks passed
@ixuz
ixuz deleted the fix/foreign-deck-reads-budget branch November 8, 2026 23:09
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