Skip to content

fix(#402): Security (low): password-protected public link reveals the item's name before th - #411

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

BeSovereign merged 1 commit into
mainfrom
fix/issue-402

Conversation

@BeSovereign

Copy link
Copy Markdown
Contributor

Refs #402

A locked public link's info() now returns only { locked: true }; name/type are optional in the shared type, and PublicLinkView shows a generic 'Protected link' heading from all three locales until unlock (recorded in DECISIONS.md). This round moves the #402 E2E checks into the existing password-link test, because the separate test's extra home folder pushed the shared home listing past the 200-row window and broke collision.spec.ts on mobile.

Driver gates (measured, not claimed)

  • Suites: typecheck: 1 passed, 0 failed | lint: 1 passed, 0 failed | unit: 1187 passed, 0 failed | e2e: 603 passed, 0 failed
  • Red/green check on declared tests: server/test/publicLinks.test.ts, server/test/sharingMatrix.test.ts, e2e/public-links.spec.ts, e2e/cloud-sharing.spec.ts
red/green output
RED without the change:
it 1: the visitor sees no name before unlocking (#402), downloads once, and a second download is refused 
    [desktop-chrome] › e2e/public-links.spec.ts:160:1 › a file named like markup is shown as text on the share page, and not at all on the password prompt; no script runs 
    [mobile-chrome] › e2e/cloud-sharing.spec.ts:193:1 › a public link to a Google Drive file with a password and limit 1: unlocked, downloaded once, then refused 
    [mobile-chrome] › e2e/public-links.spec.ts:56:1 › a link with password and limit 1: the visitor sees no name before unlocking (#402), downloads once, and a second download is refused 
    [mobile-chrome] › e2e/public-links.spec.ts:160:1 › a file named like markup is shown as text on the share page, and not at all on the password prompt; no script runs 


GREEN with the change:
ds once, and a second download is refused (1.9s)
  ✓  3 [desktop-chrome] › e2e/public-links.spec.ts:160:1 › a file named like markup is shown as text on the share page, and not at all on the password prompt; no script runs (904ms)
  ✓  4 [mobile-chrome] › e2e/cloud-sharing.spec.ts:193:1 › a public link to a Google Drive file with a password and limit 1: unlocked, downloaded once, then refused (2.5s)
  ✓  5 [mobile-chrome] › e2e/public-links.spec.ts:56:1 › a link with password and limit 1: the visitor sees no name before unlocking (#402), downloads once, and a second download is refused (2.1s)
  ✓  6 [mobile-chrome] › e2e/public-links.spec.ts:160:1 › a file named like markup is shown as text on the share page, and not at all on the password prompt; no script runs (1.1s)

  6 passed (13.6s)

🤖 Generated with Claude Code

A locked public link's info() now returns only { locked: true }; name/type are optional in the shared type, and PublicLinkView shows a generic 'Protected link' heading from all three locales until unlock (recorded in DECISIONS.md). This round moves the #402 E2E checks into the existing password-link test, because the separate test's extra home folder pushed the shared home listing past the 200-row window and broke collision.spec.ts on mobile.

Refs #402

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. Fix is sound: locked info is a literal {locked:true}; list/content gate on requireUnlocked before any parsing; cookie binding unchanged; tests go red without the fix. Inert assertion: new test sends 'fs_link=forged' but the https harness cookie is '__Secure-fs_link' (pre-existing line 339 covers tampering). backendOf() still runs before the lock check in info/unlock (pre-existing). Schema could be a discriminated union.

@BeSovereign
BeSovereign merged commit f74d4c3 into main Oct 20, 2026
3 checks passed
@BeSovereign
BeSovereign deleted the fix/issue-402 branch October 20, 2026 11:10
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