Skip to content

fix: keep disk proxy reads inside root - #134

Open
vagdotdev wants to merge 1 commit into
tscircuit:mainfrom
vagdotdev:bounty/disk-proxy-root-guard-5
Open

fix: keep disk proxy reads inside root#134
vagdotdev wants to merge 1 commit into
tscircuit:mainfrom
vagdotdev:bounty/disk-proxy-root-guard-5

Conversation

@vagdotdev

Copy link
Copy Markdown

Summary

  • block disk proxy ../ traversal by resolving candidate paths against the configured proxy root
  • return the existing File not found 404 for escaped paths
  • add a route regression proving a sibling file cannot be downloaded through a disk proxy

Validation

  • bun test tests/routes/file-proxy02.test.ts
  • bun test
  • bunx tsc --noEmit
  • bun run format:check
  • bun run build
  • git diff --check

/claim #5

@vagdotdev

Copy link
Copy Markdown
Author

/claim #5

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