Skip to content

fix(solid): never count a user's storage as an instance's own folder - #734

Merged
ixuz merged 1 commit into
mainfrom
fix/pod-root-instance-folder
Nov 12, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/pod-root-instance-folder

Conversation

@ixuz

@ixuz ixuz commented Nov 11, 2026

Copy link
Copy Markdown
Member

What and why

An older deck document that doesn't say it is the deck's is taken as the deck's when it sits in the instance's own folder. The next write then adds its back-link, the data check doesn't list it, and a removal deletes it without reading it. A pod's or a storage's root is never such a folder, because it holds the user's other data too.

The guard only recognized a storage root when the server typed it as one. Some servers hold many users' pods on one origin and leave their roots untyped. On those, an instance kept at the root of the user's pod treated every older document in the pod as the deck's, even though the user's profile names that folder as a storage.

What changes:

  • An instance's folder no longer counts as its own when it is one of the user's storages or a folder above one, as well as when the server shows it as a storage's root. The comparison ignores differences in host case, the default port and a trailing slash.
  • When the user's storages can't be found, a write fails and can be retried.
  • In that case the data check and a removal read the document, and treat it as unclaimed unless it says it is the deck's.

docs/data-model.md says how a pod or storage root is recognized. This builds on the user's storages that the previous storage fix (#730) passes to the guard.

Refs: GHSA-pq2f-cr8r-9jqc

An older deck document that does not say it is the deck's is taken as
the deck's in the instance's own folder: the next write states it, the
data check does not list it, and a removal deletes it without reading
it. A pod's or a storage's root is never such a folder, as it holds
the user's other data too. But the guard knew a storage's root only
when the server typed it, and a server that holds many users' pods on
one origin may leave their roots untyped. An instance kept at the root
of the user's pod there took every older document in the pod for the
deck's, though the user's profile names that folder as a storage.

The instance's folder is now not its own when it is one of the user's
storages or a folder above one, whatever the case of the host, its
default port or a trailing slash, as well as when the server shows it
as a storage's root. When the user's
storages can't be found, a write fails and can be retried, and the
data check and a removal read the document and take it for unclaimed
unless it says it is the deck's.

Refs: GHSA-pq2f-cr8r-9jqc
@ixuz ixuz added bug Something isn't working interop labels Nov 11, 2026
@ixuz
ixuz enabled auto-merge November 12, 2026 00:03
@ixuz
ixuz added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 5221704 Nov 12, 2026
53 checks passed
@ixuz
ixuz deleted the fix/pod-root-instance-folder branch November 12, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working interop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant