-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(security): zip slip #1228
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(security): zip slip #1228
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements zip slip security protection by preventing path traversal attacks during archive decompression. The changes add validation to ensure extracted files cannot escape the intended output directory through malicious path names containing "../" sequences.
- Replaces standard library
path
withfilepath
for proper OS-specific path handling - Adds path validation checks in decompression functions to prevent zip slip attacks
- Introduces utility function usage for path cleaning and normalization
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
不只是ZIP,其他格式也要修 |
已添加,其它格式待测试 |
No description provided.