Skip to content

fix(solid): name an instance whose folder does not decode as written - #566

Merged
ixuz merged 1 commit into
mainfrom
fix/instance-name-bad-escape
Nov 4, 2026
Merged

ixuz merged 1 commit into
mainfrom
fix/instance-name-bad-escape

Conversation

@ixuz

@ixuz ixuz commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

What and why

An instance registration with no title is named after its folder, and that name was decoded with decodeURIComponent. That throws on a lone percent sign, a non-hex escape, or bytes that are not UTF-8, such as a Latin-1 folder name another app wrote as caf%E9. The address check accepts such addresses, so one registration like that in a type index made the whole instance list fail. The workspace could not open until the registration was removed by hand. Adding such a folder by its address failed the same way.

  • Names: lastPathSegment (packages/solid/src/urls.ts) returns the segment as written when it does not decode.
  • The list: listInstances leaves out a registration that cannot be read as an instance, and the rest of the list still loads.
  • Other decodes: the other decodeURI/decodeURIComponent calls on pod or link text already catch a failed decode.
  • Tests: %E9, a lone % and %ZZ in the last segment, and one bad registration among good ones.
  • Docs: docs/data-model.md.

Refs: GHSA-4mmj-5fv6-9jjf

@ixuz
ixuz marked this pull request as draft November 4, 2026 16:10
An instance registration with no title is named after its folder, and
that name was decoded with decodeURIComponent, which throws on a lone
percent sign, a non-hex escape or bytes that are not UTF-8, such as a
Latin-1 folder name another app wrote as caf%E9. The address check
accepts such addresses, so one registration like that in a type index
made the whole instance list fail, and the workspace could not open
until the registration was removed by hand. Adding such a folder by
its address failed the same way.

lastPathSegment now returns the segment as written when it does not
decode, and listInstances leaves out a registration that cannot be
read as an instance instead of failing the list with it.

Refs: GHSA-4mmj-5fv6-9jjf
@ixuz
ixuz force-pushed the fix/instance-name-bad-escape branch from f26bfd4 to 0ec77ab Compare November 4, 2026 17:11
@ixuz ixuz added the bug Something isn't working label Nov 4, 2026
@ixuz
ixuz marked this pull request as ready for review November 4, 2026 17:17
@ixuz
ixuz enabled auto-merge November 4, 2026 17:20
@ixuz
ixuz added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 783d97b Nov 4, 2026
51 checks passed
@ixuz
ixuz deleted the fix/instance-name-bad-escape branch November 4, 2026 18:01
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