Skip to content

fix: prevent public path traversal - #67

Merged
chenjiahan merged 2 commits into
mainfrom
chenjiahan/fix-public-path-traversal
Sep 4, 2026
Merged

chenjiahan merged 2 commits into
mainfrom
chenjiahan/fix-public-path-traversal

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR prevents requests matched by a public path without a trailing slash, such as /static../secret.txt, from resolving outside the configured output path. It validates the final joined filename only when the decoded pathname contains .., preserving the fast path for ordinary asset requests, and adds regression coverage across all supported server frameworks.

Related links

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T14:20:57.745221Z 5ff48ca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chenjiahan
chenjiahan merged commit 5460d31 into main Sep 4, 2026
5 checks passed
@chenjiahan
chenjiahan deleted the chenjiahan/fix-public-path-traversal branch September 4, 2026 02:16
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