Commit graph

349 commits

Author SHA1 Message Date
Chris Hennick
3e06f6433a
chore: Fix borrow-of-moved-value 2024-05-15 17:08:40 -07:00
Chris Hennick
633a6733e6
refactor: Check if archive contains a symlink's target, without borrowing both at the same time 2024-05-15 17:06:57 -07:00
Chris Hennick
17fee7938a
refactor: Eliminate a clone that's no longer necessary 2024-05-15 16:57:37 -07:00
Chris Hennick
7536a98da1
chore: Box<str> doesn't directly convert to PathBuf, so convert back to String first 2024-05-15 16:55:00 -07:00
Chris Hennick
d78f127039
chore: contains_key needs a Box<str>, so generify is_dir to accept one 2024-05-15 16:49:05 -07:00
Chris Hennick
b7ac989013
refactor: is_dir only needs to look at the filename 2024-05-15 16:44:59 -07:00
Chris Hennick
1e574a961a
chore: Fix another Windows-specific error 2024-05-15 16:14:57 -07:00
Chris Hennick
91dcf305d7
chore: More bug fixes for Windows-specific symlink code 2024-05-15 16:11:37 -07:00
Chris Hennick
ce818e4df1
chore: More bug fixes for Windows-specific symlink code 2024-05-15 16:08:39 -07:00
Chris Hennick
aca750d616
chore: Bug fix: variable name change 2024-05-15 15:57:54 -07:00
Chris Hennick
9d11f4cf68
chore: Bug fix: need both internal and output path to determine whether to symlink_dir 2024-05-15 15:53:26 -07:00
Chris Hennick
2a67534fcb
chore: Another bug fix 2024-05-15 15:37:31 -07:00
Chris Hennick
47a07fb964
chore: Fix another error-type conversion error 2024-05-15 15:32:08 -07:00
Chris Hennick
23068ad7c2
chore: Fix error-type conversion on Windows 2024-05-15 15:22:49 -07:00
Chris Hennick
8435561093
chore: Fix continued issues, and factor out the Vec<u8>-to-OsString conversion (cc: #125) 2024-05-15 15:08:41 -07:00
Chris Hennick
c52ec50306
chore: Fix CI failure involving conversion to OsString for symlinks (see my comments on #125) 2024-05-15 14:47:52 -07:00
Chris Hennick
f275acf1d2
chore: Move path join into platform-independent code 2024-05-14 13:25:15 -07:00
Chris Hennick
0ec043d6be
style: Remove an unused import on Windows 2024-05-14 13:11:57 -07:00
Chris Hennick
d96ba59197
doc: Document symlink extraction behavior 2024-05-13 20:56:03 -07:00
Chris Hennick
8715d936cb
fix: Extract symlinks into symlinks on Unix and Windows, and fix a bug that affected making directories writable on MacOS 2024-05-13 20:50:40 -07:00
Chris Hennick
3bf0301e39
feat: Add is_symlink method 2024-05-13 19:52:14 -07:00
Chris Hennick
a385aaf854
doc: Important correction: consuming package has to *target* Unix, e.g. this lib doesn't protect you when running on Wine or Mono 2024-05-10 16:40:41 -07:00
Chris Hennick
4a5d28ed30
doc: Important correction: contents might not have been extracted at all 2024-05-10 16:39:12 -07:00
Chris Hennick
ba4c6936d5
doc: Important clarification: "any user" -> "any non-root user" 2024-05-10 16:37:02 -07:00
Chris Hennick
c28614a0b2
doc: Document the guarantee provided by 137672cb29 2024-05-10 16:35:35 -07:00
Chris Hennick
137672cb29
fix: Remove a window when an extracted directory might be unexpectedly listable and/or cdable by non-owners 2024-05-10 16:26:47 -07:00
Chris Hennick
46c022ea03
chore: More conditionally-unused imports 2024-05-10 15:14:08 -07:00
Chris Hennick
2ea4e5059f
fix: Extract directory contents on Unix even if the directory doesn't have write permission (https://github.com/zip-rs/zip-old/issues/423) 2024-05-10 14:27:25 -07:00
Chris Hennick
bd473ef75b
perf: Use boxed slice for archive comment, since it can't be concatenated 2024-05-08 15:36:12 -07:00
Chris Hennick
f7ab2ae506
fix: Prevent panic when trying to read a file with an unsupported compression method 2024-05-06 16:43:04 -07:00
Chris Hennick
d13031cc14
fix: Prevent panic after reading an invalid LZMA file 2024-05-06 16:08:41 -07:00
Chris Hennick
8868a11d23
test(fuzz): Fix a fuzz-read bug when finishing LZMA 2024-05-06 15:53:12 -07:00
Chris Hennick
162c9b7281
test(fuzz): Fix bugs that were breaking the fuzz test 2024-05-06 14:41:51 -07:00
Johannes Löthberg
d824fc2088
Make crypto validate methods return ZipError when signifying invalid passwords
Signed-off-by: Johannes Löthberg <johannes.loethberg@elokon.com>
2024-05-06 16:37:05 +02:00
Johannes Löthberg
d096e4dbf1
Add support for writing AES-encrypted files
Signed-off-by: Johannes Löthberg <johannes.loethberg@elokon.com>
2024-05-06 16:37:05 +02:00
Johannes Löthberg
80dc8f2484
Add compression method to AES info
Signed-off-by: Johannes Löthberg <johannes.loethberg@elokon.com>
2024-05-06 16:37:05 +02:00
Chris Hennick
a8ec016b51
style: cargo fmt --all 2024-05-05 18:43:40 -07:00
Chris Hennick
aa890fa634
feat: Add method decompressed_size() so non-recursive ZIP bombs can be detected 2024-05-05 18:28:17 -07:00
Chris Hennick
a86a72fdc6
chore: Fix conflicts with other recently-merged PRs 2024-05-03 13:24:47 -04:00
Chris Hennick
d98772e633
style: Fix a Clippy warning in read.rs 2024-05-03 13:24:15 -04:00
Danny McClanahan
d1695053f5
use indexmap 2024-05-03 13:24:11 -04:00
Chris Hennick
1d1d9a631f
Merge branch 'master' into no-byte-order-a 2024-05-02 22:22:42 -07:00
Chris Hennick
84ae5fc157
refactor: Remove byteorder dependency (#83) 2024-05-02 17:50:27 -07:00
Chris Hennick
ef0c942db7
Merge pull request #75 from cosmicexplorer/oldpr400
feat: add ZipWriter::finish_into_readable()
2024-05-02 21:14:48 +00:00
Chris Hennick
033ec7bd46
Merge pull request #76 from cosmicexplorer/oldpr401
feat: add ZipWriter::merge_archive() to efficiently copy all entries from a ZipArchive
2024-05-02 20:49:28 +00:00
Chris Hennick
c8655d9eda
Merge pull request #77 from cosmicexplorer/oldpr395
refactor: use num_enum to clean up the System type
2024-05-02 20:48:04 +00:00
Chris Hennick
383e00de62
Merge branch 'master' into oldpr395 2024-05-02 11:33:59 -07:00
Chris Hennick
c3fe6f0954
Merge branch 'master' into oldpr437a 2024-05-02 11:31:57 -07:00
Chris Hennick
2309eb7b64
Revert "fix: Build was failing with bzip2 enabled"
This reverts commit 5fbc9912a3.
2024-05-02 11:22:56 -07:00
Chris Hennick
f9d2952686
Merge branch 'master' into oldpr395 2024-05-02 11:20:29 -07:00