Commit Graph
5 Commits
Author SHA1 Message Date
marc2332 fad0607667 feat: Reduce CLI deps 2024-01-27 22:27:23 +01:00
Brian Donovan 03e02591ec fix(cli): allows extracting files without separate directory entries
Some zip files do not list directories separately from files. For example, a zip might contain `dir/file.txt` without a corresponding entry for just `dir/`. This should be okay, so we just create the leading paths for the files we extract as necessary.

Also adds tests for the expected and dangerous path cases of `extract_zip`.
2023-08-04 21:28:09 -07:00
Brian Donovan 14e7c50478 fix(cli): prevent "zip slip" vulnerability in tool extract
Using the name directly from a zip archive's entry and writing to it is a potential security vulnerability. More information about the vulnerability can be found here: https://security.snyk.io/research/zip-slip-vulnerability and here https://docs.rs/zip/latest/zip/read/struct.ZipFile.html#warnings.

It looks like the previous version maybe tried to remove `\` characters to prevent this, but only in directory paths?
2023-08-04 20:02:07 -07:00
Miles Murgaw 2c8c601579 fix: clippy 2023-06-30 10:48:38 -04:00
Jonathan Kelley a9d7b4d32a Prepare CLI for move into mainline 2023-06-28 17:21:23 -07:00