Skip to content

fix(#418): Security: deleting a shared cloud folder in Files leaves shares, links and file - #428

Merged
BeSovereign merged 1 commit into
mainfrom
fix/issue-418
Oct 20, 2026
Merged

BeSovereign merged 1 commit into
mainfrom
fix/issue-418

Conversation

@BeSovereign

Copy link
Copy Markdown
Contributor

Refs #418

Deletes of cloud items through Files (sources route, duplicate finder, move jobs, migration cleanup, grantee deletes in cloud shares) now orphan shares, public links and file requests via the new orphanPathRefs/orphanDeleted (410, never revived). ShareBackend writes and version restores, plus cloud file-request creation and placement, first check that the shared item or folder still exists and answer NOT_FOUND, so no write recreates a vanished path. Adversarial and test-adversary reviews ran; the restore guard and tests for placement, cleanup, grantee delete and the source filter were added after them.

Driver gates (measured, not claimed)

  • Suites: typecheck: 1 passed, 0 failed | lint: 1 passed, 0 failed | unit: 1198 passed, 0 failed | e2e: 616 passed, 0 failed
  • Red/green check on declared tests: server/test/sharingMatrix.test.ts, server/test/migrations.test.ts, e2e/cloud-sharing.spec.ts
red/green output
RED without the change:
 (application/zip) ─────────────────────────────────────────────────────────
    test-results/cloud-sharing--418-the-own-7e200--the-visitor-gets-the-alert-mobile-chrome/trace.zip
    Usage:

        pnpm exec playwright show-trace test-results/cloud-sharing--418-the-own-7e200--the-visitor-gets-the-alert-mobile-chrome/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

  2 failed
    [desktop-chrome] › e2e/cloud-sharing.spec.ts:230:1 › #418 the owner deletes a shared Dropbox folder: "My shares" lists its link and share as gone, the visitor gets the alert 
    [mobile-chrome] › e2e/cloud-sharing.spec.ts:230:1 › #418 the owner deletes a shared Dropbox folder: "My shares" lists its link and share as gone, the visitor gets the alert 


GREEN with the change:
moved to avoid issues.

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
$ node build.mjs


Running 2 tests using 1 worker

  ✓  1 [desktop-chrome] › e2e/cloud-sharing.spec.ts:230:1 › #418 the owner deletes a shared Dropbox folder: "My shares" lists its link and share as gone, the visitor gets the alert (1.5s)
  ✓  2 [mobile-chrome] › e2e/cloud-sharing.spec.ts:230:1 › #418 the owner deletes a shared Dropbox folder: "My shares" lists its link and share as gone, the visitor gets the alert (1.5s)

  2 passed (5.5s)

🤖 Generated with Claude Code

Deletes of cloud items through Files (sources route, duplicate finder, move jobs, migration cleanup, grantee deletes in cloud shares) now orphan shares, public links and file requests via the new orphanPathRefs/orphanDeleted (410, never revived). ShareBackend writes and version restores, plus cloud file-request creation and placement, first check that the shared item or folder still exists and answer NOT_FOUND, so no write recreates a vanished path. Adversarial and test-adversary reviews ran; the restore guard and tests for placement, cleanup, grantee delete and the source filter were added after them.

Refs #418

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BeSovereign

Copy link
Copy Markdown
Contributor Author

Security review (claude-fable-5-1): no blocking finding. No exploitable gap found. Orphaning keys come only from keysOf (owner-scoped, share-granted), run only after a successful provider delete; every write path into a share passes present(), file requests stat before creation and placement, after rate limiting. Hardening: present() untested for delete/move/copy/restoreRevision on a gone root; partial multi-path delete failure and Dropbox case-only deletes leave rows live (documented, no access gain); Drive 30 s path cache window documented.

@BeSovereign
BeSovereign merged commit 5bb1931 into main Oct 20, 2026
3 checks passed
@BeSovereign
BeSovereign deleted the fix/issue-418 branch October 20, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant