Skip to content

Comments

Add zipinsecurepath to rwp#103

Merged
chocolatkey merged 2 commits intodevelopfrom
secure-rwp-zip
Sep 12, 2024
Merged

Add zipinsecurepath to rwp#103
chocolatkey merged 2 commits intodevelopfrom
secure-rwp-zip

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

@chocolatkey chocolatkey merged commit 5285f17 into develop Sep 12, 2024
@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