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

Switch to using Archive::Zip and Archive::Tar to extract archives. #49

Merged

Conversation

drgrice1
Copy link

@drgrice1 drgrice1 commented Sep 3, 2023

The Archive::Extract module is not safe with zip files and can extract files outside of the current working directory (assuming the server has write permission to do so).

The Archive::Zip and Archive::Tar modules will not extract outside of the current working directory (by default).

Additionally, using the Archive::Zip and Archive::Tar modules gives more power for archive extraction. If the "Overwrite existing files silenetly" checkbox is not checked, then this now checks each file in the archive to see if extracting it will overwrite an existing file. If so it refuses to do so, and a message is displayed.

The `Archive::Extract` module is not safe with zip files and can extract
files outside of the current working directory (assuming the server has
write permission to do so).

The `Archive::Zip` and `Archive::Tar` modules will not extract outside
of the current working directory (by default).

Additionally, using the `Archive::Zip` and `Archive::Tar` modules gives
more power for archive extraction. If the "Overwrite existing files
silenetly" checkbox is not checked, then this now checks each file in
the archive to see if extracting it will overwrite an existing file.  If
so it refuses to do so, and a message is displayed.
@pstaabp pstaabp merged commit 35c62a4 into pstaabp:add-zip-to-archives Sep 4, 2023
@drgrice1 drgrice1 deleted the add-zip-to-archives-safe branch September 4, 2023 13:49
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