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: prevent path traversal attacks #631

Merged
merged 1 commit into from
Jan 7, 2025
Merged

fix: prevent path traversal attacks #631

merged 1 commit into from
Jan 7, 2025

Conversation

aymanbagabas
Copy link
Member

This commit fixes a path traversal vulnerability in the repository management code. The SanitizeRepo function now correctly returns a sanitized version of the given repository name. It uses an absolute path along with path.Clean to ensure that the path is cleaned before being used.

This commit fixes a path traversal vulnerability in the repository
management code. The `SanitizeRepo` function now correctly returns a
sanitized version of the given repository name. It uses an absolute
path along with `path.Clean` to ensure that the path is cleaned
before being used.
@aymanbagabas aymanbagabas requested a review from caarlos0 January 7, 2025 07:45
@aymanbagabas aymanbagabas merged commit a8d1bf3 into main Jan 7, 2025
10 checks passed
@aymanbagabas aymanbagabas deleted the path-traversal branch January 7, 2025 11:30
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.

2 participants