Security hotfix: storage stack hid path mapping + permission checks from the API (#831); details pane surface #832

Merged
Cordy merged 2 commits from hotfix-actrec into main 2026-10-01 21:21:14 +00:00
Owner

Fixes #831, and a broader security regression with the same root cause. v0.6.315.

Root cause

Since v0.6.254 (#673) actrec is the outermost storage layer and apiH.Store is actrec. actrec only implemented storage.Driver, so every API interface assertion for the scope driver's extra capabilities silently failed:

Capability Used by Effect while hidden
Resolve grants, share links, list chips, locks, WOPI grants/links stored under the user's VIEW path (/home/x) instead of the backend path (/home/<user>/x); Shared/Public/Hold chips gone for everyone
Delegated grant + link create recipients could re-share files shared with them
ReadOnly upload links, listings read-only space members could mint upload links; read-only badge advisory missing

Live example on files-bao: sharer1's grant and public link on "/home/sharer2" pointed at sharer2's whole home. Revoked (with Nikola's OK) before this PR.

Fix

  • actrec forwards Resolve, ReadOnly, Delegated to the inner stack, with identity/false fallbacks when the stack is not scoped (that is also the correct answer for unscoped administrators, so #831's admin case is fixed too).
  • Guard: TestActrecForwardsEveryScopeCapability reflects over *scope.Driver and fails if actrec misses any non-builder method (red with the old actrec: Delegated, ReadOnly, Resolve).
  • API tests through the real wrapper: grant stored under the resolved path, re-share refused (both red before, green after). The old tests used stub drivers directly as h.Store, which is why this was invisible.

Details pane

#675 scoped the sidebar rules away from #detpane; the pane had been inheriting the sidebar's surface, edge and inset, which is what separated it from the list. Restored explicitly for desktop (#app > aside#detpane, ≥820px; specificity beats the runtime-injected pane CSS). Checked on a local build: pane background equals the sidebar's, padding 12px 8px, sticky at 56px; phone sheet unchanged.

Not in this PR (decision needed)

Records created v0.6.254–v0.6.314 by non-admin users still carry view paths. Product is pre-release, so the exposure is the dogfoods; options in the chat.

Fixes #831, and a broader security regression with the same root cause. v0.6.315. ## Root cause Since v0.6.254 (#673) `actrec` is the outermost storage layer and `apiH.Store` is actrec. actrec only implemented `storage.Driver`, so every API interface assertion for the scope driver's extra capabilities silently failed: | Capability | Used by | Effect while hidden | |---|---|---| | `Resolve` | grants, share links, list chips, locks, WOPI | grants/links stored under the user's VIEW path (`/home/x`) instead of the backend path (`/home/<user>/x`); Shared/Public/Hold chips gone for everyone | | `Delegated` | grant + link create | recipients could re-share files shared with them | | `ReadOnly` | upload links, listings | read-only space members could mint upload links; read-only badge advisory missing | Live example on files-bao: sharer1's grant and public link on "/home/sharer2" pointed at **sharer2's whole home**. Revoked (with Nikola's OK) before this PR. ## Fix - `actrec` forwards `Resolve`, `ReadOnly`, `Delegated` to the inner stack, with identity/false fallbacks when the stack is not scoped (that is also the correct answer for unscoped administrators, so #831's admin case is fixed too). - Guard: `TestActrecForwardsEveryScopeCapability` reflects over `*scope.Driver` and fails if actrec misses any non-builder method (red with the old actrec: Delegated, ReadOnly, Resolve). - API tests through the real wrapper: grant stored under the resolved path, re-share refused (both red before, green after). The old tests used stub drivers directly as `h.Store`, which is why this was invisible. ## Details pane #675 scoped the sidebar rules away from `#detpane`; the pane had been inheriting the sidebar's surface, edge and inset, which is what separated it from the list. Restored explicitly for desktop (`#app > aside#detpane`, ≥820px; specificity beats the runtime-injected pane CSS). Checked on a local build: pane background equals the sidebar's, padding 12px 8px, sticky at 56px; phone sheet unchanged. ## Not in this PR (decision needed) Records created v0.6.254–v0.6.314 by non-admin users still carry view paths. Product is pre-release, so the exposure is the dogfoods; options in the chat.
web: details pane owns its surface and inset at every width (#831 follow-up)
All checks were successful
ci / test-and-build (pull_request) Successful in 1m20s
c9ed79bef2
Cordy merged commit 9a3f8d4ac6 into main 2026-10-01 21:21:14 +00:00
Cordy deleted branch hotfix-actrec 2026-10-01 21:21:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
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#832
No description provided.