Spaces API small inconsistencies (admin /meta of a missing name, members count by former name, rename onto a reserved name reason) #938

Closed
opened 2026-10-16 01:04:20 +00:00 by Cordy · 1 comment
Owner

From the v0.6.346 live check (scratch/b7e/live346, findings 2-4). None of these disclose anything to non-admins.

  1. Admin /meta of a missing name: a session admin's GET /api/v1/spaces/nope/meta answers 200 {"name":"nope"}, not the R2 not-found 404. This is older behaviour. metaInfo should answer spaceNotFound when no space or folder exists.
  2. Member count by former name: /meta by a former name returns no members count for anyone, the owner included. Also older behaviour (v0.6.345 does the same).
  3. Rename onto a reserved name: renaming onto a reserved deleted name (gone) logs reason=space and gives admins "that name already belongs to another space", not the tombstone reason and text. People get the correct generic answer. The cause is that rename checks the registry before the tombstone.
From the v0.6.346 live check (`scratch/b7e/live346`, findings 2-4). None of these disclose anything to non-admins. 1. **Admin `/meta` of a missing name:** a session admin's `GET /api/v1/spaces/nope/meta` answers `200 {"name":"nope"}`, not the R2 not-found 404. This is older behaviour. `metaInfo` should answer `spaceNotFound` when no space or folder exists. 2. **Member count by former name:** `/meta` by a former name returns no `members` count for anyone, the owner included. Also older behaviour (v0.6.345 does the same). 3. **Rename onto a reserved name:** renaming onto a reserved deleted name (`gone`) logs `reason=space` and gives admins "that name already belongs to another space", not the tombstone reason and text. People get the correct generic answer. The cause is that rename checks the registry before the tombstone.
Author
Owner

Shipped in v0.6.350 (PR #970). Both dogfoods run it.

  1. Admin /meta of a missing name: now answers the existing not-found 404. Live, both instances: GET /api/v1/spaces/nope-b3x/meta answers 404 {"code":"not-found","error":"no such space"} (it was 200 {"name":"nope"}). A purged space's name also answers 404 now (live on files-bao after the #935 check).
  2. Member count by former name: /meta by a former name resolves to the space first, so the member count is the same as by the current name. Tested on posix and s3; not seen live separately.
  3. Rename onto a reserved deleted name: the tombstone is checked before the registry. The log says reason=tombstone, admins get the tombstone text, and people keep the generic answer. Live (files-bao, creating a reserved name): 409 name-in-use with "this space name is reserved by a recently deleted space", and the log line spaces: name in use … reason=tombstone.
**Shipped in v0.6.350 (PR #970). Both dogfoods run it.** 1. **Admin `/meta` of a missing name:** now answers the existing not-found 404. **Live, both instances:** `GET /api/v1/spaces/nope-b3x/meta` answers `404 {"code":"not-found","error":"no such space"}` (it was `200 {"name":"nope"}`). A purged space's name also answers 404 now (live on files-bao after the #935 check). 2. **Member count by former name:** `/meta` by a former name resolves to the space first, so the member count is the same as by the current name. Tested on posix and s3; not seen live separately. 3. **Rename onto a reserved deleted name:** the tombstone is checked before the registry. The log says `reason=tombstone`, admins get the tombstone text, and people keep the generic answer. **Live (files-bao, creating a reserved name):** `409 name-in-use` with "this space name is reserved by a recently deleted space", and the log line `spaces: name in use … reason=tombstone`.
Cordy closed this issue 2026-10-19 20:13:06 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#938
No description provided.