fix(deps): move zip to 9.1 (RUSTSEC-2026-0367/0368/0369)
The workspace pin goes from 8 to 9, kigi-tools drops its separate zip 3 pin for the workspace dependency, and office_oxide 0.1.16 follows onto zip 9. zip 9 decodes entry names on demand and can fail; the PPTX reader and the Windows update unpacker now report that error. The zip unpacker gains the two tests the tar path already had.
This commit is contained in:
5 files changed
+91
-66
No files matched your search
@@ -31,11 +31,7 @@ infer = { workspace = true }
|
||||
globset = { workspace = true }
|
||||
image = { workspace = true, features = ["png", "jpeg", "gif", "webp", "bmp", "tiff", "ico"] }
|
||||
pdf_oxide = { workspace = true }
|
||||
# PPTX text extraction (implementations/read_file/pptx.rs). Deliberately NOT
|
||||
# `workspace = true`: the workspace `zip` pin has default features on, which
|
||||
# drag aes/bzip2/lzma/zstd into the shipped pager binary. PPTX entries are
|
||||
# only ever stored or deflated.
|
||||
zip = { version = "3", default-features = false, features = ["deflate-flate2"] }
|
||||
zip = { workspace = true }
|
||||
quick-xml = { workspace = true }
|
||||
indexmap = { workspace = true, features = ["serde"] }
|
||||
minijinja = { version = "2", features = ["custom_syntax"] }
|
||||
|
||||
@@ -31,10 +31,14 @@ pub(crate) fn extract_pptx_text_from_bytes(bytes: &[u8]) -> Result<String, Strin
|
||||
let mut archive = ZipArchive::new(Cursor::new(bytes))
|
||||
.map_err(|e| format!("Failed to open PPTX archive: {e}"))?;
|
||||
|
||||
let names = archive
|
||||
.file_names()
|
||||
.collect::<Result<Vec<_>, _>>()
|
||||
.map_err(|e| format!("Failed to read PPTX entry names: {e}"))?;
|
||||
// Collect slide numbers from `ppt/slides/slideN.xml` entries and sort
|
||||
// numerically so slide ordering matches the presentation.
|
||||
let mut slide_numbers: Vec<u32> = archive
|
||||
.file_names()
|
||||
let mut slide_numbers: Vec<u32> = names
|
||||
.iter()
|
||||
.filter_map(|name| {
|
||||
name.strip_prefix("ppt/slides/slide")?
|
||||
.strip_suffix(".xml")?
|
||||
|
||||
Reference in new issue
Block a user