Skip to content

Add zipinsecurepath to rwp #103

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

Merged
merged 2 commits into from
Sep 12, 2024
Merged

Add zipinsecurepath to rwp #103

merged 2 commits into from
Sep 12, 2024

Conversation

chocolatkey
Copy link
Member

@chocolatkey chocolatkey commented Sep 12, 2024

From the archive/zip docs:

// If any file inside the archive uses a non-local name
// (as defined by [filepath.IsLocal]) or a name containing backslashes
// and the GODEBUG environment variable contains `zipinsecurepath=0`,
// NewReader returns the reader with an [ErrInsecurePath] error.

This seems like a nice addition to make rwp more secure. There's no proven reason why this would turn into a security issue with the current code, but I think this is always a good addition when it comes to potential ZIP exploits.
The only downside is enabling it requires a hacky setting of the environment variables

Verified

This commit was signed with the committer’s verified signature.
flip1995 Philipp Krones
@chocolatkey chocolatkey merged commit 5285f17 into develop Sep 12, 2024
4 checks passed
@chocolatkey chocolatkey deleted the secure-rwp-zip branch September 12, 2024 08:50
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