The first run of cargo-deny on the lock file (2026-11-09) listed 23 RustSec advisories, one unsound crate and two yanked ones. This closes all but two by upgrading; the two are a second copy of quick-xml that typst brings and that reads nothing from outside (the gate's file, next commit, says so with its reason and date). A wrong answer found on the way. quick-xml 0.42 reports a character or entity reference (`&`, `&`) as an event of its own, where 0.38 handed it over inside the text. The reader's first build on 0.42 took only the text events, so a cell holding `AT&T` read as `ATT`: a payee's name, changed without a word, on its way into an import. The reader now turns each reference into its character (the five XML names, decimal and hexadecimal numbers) in shared strings and in inline cell text, and refuses a file whose reference names no character rather than dropping it. Two new tests: a reference in a cell is its character; a reference to no character is refused. What moved, and the advisory each closes: - quick-xml 0.38 -> 0.42 in ledger-reader, the copy that parses files from outside (RUSTSEC-2026-0194, -0195: a slow or memory-hungry parse of hostile XML). - rusqlite 0.32 -> 0.41, with `fallible_uint` so a u64 past i64::MAX is an error and never a wrapped number (libsqlite3-sys, RUSTSEC-2026-0459). One test's use of `column_names` follows the new signature. - rust_xlsxwriter 0.90 -> 0.102, which drops the old zip 4 (RUSTSEC-2026-0367, -0368, -0369, -0429). - In the lock file only: rustls (-0346 to -0349), rustls-webpki (-0382), webpki-root-certs (-0383), ctutils (-0385), tokio (-0386), zstd, zstd-safe and zstd-sys (-0391, -0398, -0403, -0410), pulldown-cmark (-0433), rmcp 3.5 -> 3.9 (-0457, -0461, -0462), and the yanked async-executor and clipboard-win. - fuzz/Cargo.lock in step, so the fuzz targets build what ships. No new dependency of ours: rsqlite-vfs and sqlite-wasm-rs enter the lock file as rusqlite's own, for a target (wasm) we do not build. Shown: `cargo check --workspace --all-targets` clean; `cargo test` of ledger-reader (4 passed), ledger-import (145 passed, 2 ignored) and ledger-store (579 passed, 2 ignored, exit 0). The store run kept its scratch files in memory (TMPDIR on tmpfs): on the loaded disk a synced write took 30 ms and the refusal law alone ran past half an hour. Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
877 B
TOML
24 lines
877 B
TOML
[package]
|
|
name = "ledger-reader"
|
|
version = "0.1.0"
|
|
edition = "2024"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "The one reader: a PDF's text and pages, an XLSX's cells as exact decimal strings (plan P6, D-61)."
|
|
|
|
[dependencies]
|
|
thiserror = "2"
|
|
# Extraction (plan P6): a PDF's text, a page's pixels, an XLSX's cells.
|
|
# hayro (the renderer) and hayro-interpret (the text interpreter) are pure
|
|
# Rust and already the viewer's PDF reader, so the server and the viewer
|
|
# read a receipt through one implementation rather than two; `zip` and
|
|
# `quick-xml` read a spreadsheet's XML. None of them touches money: a
|
|
# number is kept as the decimal string the XML holds.
|
|
hayro = { version = "0.8", features = ["embed-fonts"] }
|
|
hayro-interpret = "0.8"
|
|
kurbo = "0.13"
|
|
zip = { version = "9.0.1", default-features = false, features = ["deflate"] }
|
|
quick-xml = "0.42"
|
|
|
|
[lints]
|
|
workspace = true
|