Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/71/prevent-directory-traversal #72

Merged

Conversation

AmirAgassi
Copy link
Member

🔒 Prevent Directory Traversal in Static File Serving KonferCA/SPUR#233

🔍 What's Included

  • Added input sanitization and path validation to setupStaticRoutes in static.go.
  • Added unit tests in static_test.go.

📁 Files Affected:

  • internal/server/static.go
  • internal/server/static_test.go

@AmirAgassi AmirAgassi requested a review from juancwu November 17, 2024 22:57
@AmirAgassi AmirAgassi self-assigned this Nov 17, 2024
Copy link

Test Results ✅

Status: success
Coverage: 15.8%
OS: Linux

Test Details
  • Triggered by: @AmirAgassi
  • Commit: a3ab630
  • Branch: refs/pull/72/merge
  • Workflow: Run Tests

Copy link
Contributor

@juancwu juancwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@AmirAgassi AmirAgassi merged commit feea0dd into main Nov 18, 2024
1 check passed
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.

[BE Fix] Patch directory traversal in static file serving
2 participants