Files
craft-libs/crates
ruchirguitarandClaude Opus 5.5 be002ddcde fix(opc): keep legacy leading-slash part names readable under zip hardening
OPC part names are a virtual namespace that is never joined to a filesystem
path, so a legacy writer's `/docProps/core.xml` must stay a readable part
even though craft-zip's named APIs now refuse leading separators.

craft-zip gains an explicit index-based virtual-name API
(`virtual_entry_name`, `virtual_entry_size`, `read_virtual_index`): leading
`/` and `\` are stripped, while `..`, drive prefixes, NUL and empty names
are still refused. The named APIs (`names`, `entry_name`, `read`, ...) are
unchanged.

Both the eager `Package` and the lazy `LazyPackage` readers, and
`declared_oversized`, enumerate and read through it. The
`backslash_zip_entry_names_are_found` case regains its `/docProps/core.xml`
entry (patched into the headers, since the writer refuses it) and asserts it
in both readers; new tests assert traversal and drive-prefix entries are
not parts in either reader, and that the virtual API does not open the
named one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 06:16:48 +05:30
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…