Skip to content

fix: reject path traversal in serve.py#597

Open
Chessing234 wants to merge 1 commit into
teorth:mainfrom
Chessing234:fix/serve-path-traversal
Open

fix: reject path traversal in serve.py#597
Chessing234 wants to merge 1 commit into
teorth:mainfrom
Chessing234:fix/serve-path-traversal

Conversation

@Chessing234

@Chessing234 Chessing234 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • translate_path now joins under BOOK_SITE/DOCS_SITE and rejects .. escapes.

Test plan

  • /analysis/../…/etc/passwd resolves to a rejected path under the site root
  • Normal /analysis/… and /analysis/docs/… paths still join correctly

Join under BOOK_SITE/DOCS_SITE and reject candidates that escape the root.
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