Skip to main content

Module util

Module util 

Source

Modules§

preset
Engine preset helpers used by both the production latexmlmath_oxide binary and by the test harness. Always compiled — no test-only dependencies. Reusable engine presets that don’t depend on the test harness.

Functions§

unpack_tar
Unpacks a tar archive into dest. A source tree is untrusted input: a link in it could lead a read (\input) or a Lua write outside the job (OXIDIZED_DESIGN_DIVERGENCES #1081). So a symbolic link is made, after every other entry, only when its target, resolved component by component through the links already there, stays inside dest (zip 9.7’s extract rule, zip/src/path.rs resolve_enclosed); a hard link only to a file inside dest (tar’s own check). Every other link, and every entry whose path would leave dest, is skipped with a counted Warning.
unpack_zip
Unpacks a .zip archive into dest with sandbox-safe permissions and symlink containment, used by both latexml_oxide and cortex_worker: