Commit Graph
2273 Commits
Author SHA1 Message Date
Dylan M. Taylor 727f945fc9 Merge branch 'main' into codex/format-adapter-safety 2026-11-14 20:11:50 -05:00
Dylan M. Taylor 8e20238384 Merge pull request #1321 from storytold/vorbis-encode-migration
feat(audio): migrate Ogg Vorbis encoding to craft-audio (PR #26)
2026-11-14 19:40:58 -05:00
Dylan M. Taylor 1a4cf6d0ba Merge pull request #1195 from alehel/craft-video/mpeg2-encode-b
craft-video: MPEG-2 encoder, second step: B pictures (#1133)
2026-11-14 19:39:11 -05:00
Dylan M. Taylor 92e665a5e8 Exercise Vorbis block boundaries with distinct channel signals 2026-11-14 18:33:24 -05:00
Dylan M. Taylor 136b29dd76 Merge pull request #1375 from storytold/codex/xfl-xml-shared
Add shared XFL document schema model
2026-11-14 18:16:50 -05:00
Dylan M. Taylor 354acd6a54 Cover Vorbis in format contract tests and assert streaming refusal 2026-11-14 18:15:14 -05:00
Dylan M. Taylor dc2b83d7f4 Document Vorbis rate semantics and validate standalone options 2026-11-14 18:13:31 -05:00
Dylan M. Taylor 9efb0a1575 Complete standalone Vorbis feature and option validation 2026-11-14 18:12:40 -05:00
Dylan M. Taylor 8ae42d1aeb Merge main and reconcile Vorbis encoding with current audio APIs 2026-11-14 18:12:03 -05:00
Dylan M. Taylor ce608a6405 test(raw): omit CFA tag in CR2 fallback regression 2026-11-14 23:10:28 +00:00
alehel c83e8ba250 craft-video: MPEG-2 encoder: flush and timestamp fixes from review (#1133)
- flush ends the GOP for average bitrate too: the budget of the pictures
  the GOP did not get is taken back, so flushed short GOPs no longer
  raise the bitrate.
- A lone picture flushed before a second sets the step gets dts = pts - 1,
  so decoding times still increase if encoding goes on.
- Presentation times whose decoding time does not fit in an i64 are
  refused with BadTimestamp before any state changes.
- Tests: the skip range test uses an f_code that can carry its vector, and
  the reconstruction count is checked before comparing pictures.
2026-11-15 00:07:33 +01:00
Dylan M. Taylor b5778c4f20 test(raw): cover missing-tag CR2 gradient decode 2026-11-14 22:52:35 +00:00
Dylan M. Taylor dd692d907e fix(raw): keep missing-tag CR2 CFA conservative 2026-11-14 22:22:35 +00:00
Dylan M. Taylor 9a33bc229a Cover prefixed XFL settings and frames 2026-11-14 22:20:54 +00:00
Dylan M. Taylor 620775e30b Format shared XFL local-name lookup 2026-11-14 22:16:51 +00:00
Dylan M. Taylor 7d6e2bf385 Match prefixed XFL schema elements 2026-11-14 21:59:22 +00:00
Dylan M. Taylor 465fa74789 fix(metadata,raw,svg): address CodeRabbit review findings 2026-11-14 21:31:04 +00:00
Dylan M. Taylor 4801a54e3c Select XFL package roots in craft-xfl 2026-11-14 21:23:28 +00:00
Dylan M. Taylor f2cd524f74 Merge pull request #1112 from storytold/chore/lock-github-actions
ci: lock workflow actions through an actions.lock lockfile
2026-11-14 16:22:25 -05:00
Dylan M. Taylor 2942da9a35 Model shared XFL publish settings 2026-11-14 21:16:28 +00:00
Dylan M. Taylor d6cd7836d3 feat(video,image-codecs,stream-codecs): add encode_with_key, encode_avif_hdr, and decode_ccitt_raw (#1369) 2026-11-14 16:15:44 -05:00
Dylan M. Taylor 79e97b6feb Merge pull request #1360 from storytold/sec/vendor-unsafe-note
vendor: record the hayro-syntax transmute as an audited exception
2026-11-14 15:59:35 -05:00
Dylan M. Taylor 712b0f792e Merge pull request #1361 from storytold/sec/psd-length-refusal
craft-psd: pin that a length not fitting 32 bits is refused, not truncated
2026-11-14 15:57:56 -05:00
Dylan M. Taylor f215740d1d Add shared XFL document schema model 2026-11-14 20:44:52 +00:00
Dylan Taylor acaa353f29 chore: trigger CI re-run 2026-11-14 15:28:11 -05:00
Dylan M. Taylor 30209caad8 feat(gif,image-codecs): add indexed/interlaced GIF, jpeg_progressive_scans, and JP2 decode (#1358)
* feat(gif,image-codecs): add indexed/interlaced GIF, jpeg_progressive_scans, and JP2 decode

* chore: update Cargo.lock for craft-image-codecs jp2 dep

* fix(image-codecs,svg): deref jp2 ch and re-export resvg from craft_svg::tree::draw
2026-11-14 15:13:21 -05:00
Terra854 db82f95711 Merge upstream main while preserving RAW import safeguards 2026-11-15 03:57:39 +08:00
Dylan M. Taylor d2b0bef7bf Merge pull request #1362 from storytold/sec/docpath-long-path
craft-docpath: prove a multi-megabyte UNC path parses iteratively
2026-11-14 14:53:24 -05:00
Dylan M. Taylor fae9569718 craft-docpath: prove a multi-megabyte UNC path parses iteratively 2026-11-14 14:53:16 -05:00
Terra854 58ef208c13 fix: preserve RAW identity and SVG byte-limit reporting 2026-11-15 03:49:35 +08:00
Dylan M. Taylor 25abb43bde craft-psd: pin that a length not fitting 32 bits is refused, not truncated 2026-11-14 14:44:05 -05:00
Dylan M. Taylor abe4aca262 vendor: record the hayro-syntax transmute as an audited exception 2026-11-14 14:44:00 -05:00
Dylan M. Taylor 5a457dda6a Merge pull request #1341 from storytold/sec/pdf-no-rc4-create
craft-pdf: refuse to create RC4 encryption without an explicit legacy call
2026-11-14 14:43:13 -05:00
Dylan M. Taylor 9d9cd81013 Merge pull request #1344 from storytold/codex/pdfx1a-review-hardening
fix(prepress): address PDF/X review findings
2026-11-14 14:41:49 -05:00
Dylan M. Taylor cbf6ea8584 Merge pull request #1335 from storytold/codex/xml-dtd-review-hardening
fix(xml): address DTD validator review findings
2026-11-14 14:41:44 -05:00
Dylan M. Taylor 3a8797a7f4 Merge pull request #1345 from storytold/sec/dwg-fail-closed
craft-dwg: refuse to convert without a worker instead of running acadrust in-process
2026-11-14 14:22:47 -05:00
Dylan M. Taylor c6221e42ff Merge remote-tracking branch 'storytold/main' into sec/pdf-no-rc4-create
# Conflicts:
#	crates/pdf/src/crypt/tests.rs
2026-11-14 13:47:06 -05:00
Dylan M. Taylor 75a654f4f8 craft-pdf, craft-pkcs7: compare password-derived verifiers without an early exit (#1340)
The PKCS#12 MAC and the PDF security handler's /U, R5/R6 and file-key
checks used plain equality, which stops at the first differing byte and
narrows a guess. Both crates now use a length-checked comparison that
folds every byte (the helper craft-offcrypto already used).
2026-11-14 13:45:48 -05:00
Dylan M. Taylor c86ea6802a craft-ora, craft-kra: charge every entry to one document-wide total (#1339)
An archive could hold many individually allowed members whose combined
decompression was unbounded, because both readers passed
max_total_bytes: u64::MAX to craft-zip. Each now passes MAX_TOTAL (4 GiB)
and every entry read is charged to it.

craft-fig's declared-entry cap drops from 1,000,000 to 100,000 to match the
other ZIP readers; its images were already bounded by Limits::max_image_total.
2026-11-14 13:45:31 -05:00
Dylan M. Taylor 74509ff055 Merge pull request #1351 from storytold/fix/reland-word6-doc-reader
craft-doc-binary: re-land Word 6.0/95 reader on main
2026-11-14 13:28:47 -05:00
Dylan M. Taylor 3032d970a6 craft-doc-binary: Word 6.0/95 text in an East Asian code page is refused, not lost
The review of wordcraft#6345 found that text in code page 932, 936, 949 or 950
was read a byte at a time, each byte above ASCII becoming U+FFFD, and the file
opened with its characters gone. Such a file is refused as every Word 6.0/95
file was before, until the piece walk decodes byte pairs. The test that
asserted the replacement characters is replaced by one that asserts the
refusal and that the same text in a Western font still opens.

The module comment on the Word 6 stylesheet header now matches the reader (a
u16 header size, then the header), as the other review comment asked.

(cherry picked from commit 92f8dd24d1)
2026-11-14 13:27:16 -05:00
kiwi4boy 387eab39f4 .doc import: Word 6.0/95 files open with their text, formatting, tables and styles
Ported from storytold/wordcraft#6317, #6335 and #6345 (one series): Word 6.0
and Word 95 files are read instead of refused: text in its code page (by font
charset, language and style), character and paragraph formatting, tables and
paragraph styles. Paths follow craft-doc-binary (craft-wordmodel,
craft-codepage, craft-cfb).

(cherry picked from commit aa220afc77)
2026-11-14 13:27:16 -05:00
Dylan M. Taylor 81e1dcec5a craft-dwg: refuse to convert without a worker instead of running acadrust here
The bridge fell back to decoding in the calling process whenever no worker
was configured, or the worker failed to start, which is exactly the case the
audit called out: acadrust allocates from sizes a hostile file declares, and
an allocation failure or stack overflow ends the process. Conversions are
now refused without a worker, a worker that cannot start is an error, and
allow_in_process() is the explicit opt-in for input known to be trusted.
2026-11-14 13:16:57 -05:00
Dylan M. Taylor d74e60b2d5 craft-pdf: refuse to create RC4 encryption without an explicit legacy call
The create() API exposed RC4-40 and RC4-128 behind a doc comment, so an app
could write files whose encryption protects nothing. create() now returns
Unsupported for both schemes; create_legacy() and
Document::set_encryption_legacy() are the explicit ways to write a file that
must stay readable by an old reader. Tests and the encrypt example, which
read and write every algorithm, use the legacy entry points.
2026-11-14 12:57:23 -05:00
Dylan M. Taylor b6b222afb0 fix(prepress): address PDF/X review findings 2026-11-14 17:45:53 +00:00
Dylan M. Taylor f5720d8f69 refactor(xml): share bounded tree-node validation 2026-11-14 17:36:14 +00:00
Dylan M. Taylor bac1a19d93 fix(xml): harden DTD validation bounds and parsing 2026-11-14 17:10:03 +00:00
Dylan M. Taylor 7ad4765ee5 Merge pull request #1325 from storytold/codex/docx-level-presence
docx: retain explicitly defined numbering levels
2026-11-14 11:48:48 -05:00
Dylan M. Taylor 3e399149a8 Merge pull request #1316 from storytold/sonar/s4790-format-hash-exclusions
sonar: ignore the weak hashes the encrypted formats require (SonarCloud S4790)
2026-11-14 11:47:14 -05:00
Dylan M. Taylor c9bf4a34a6 Merge pull request #1242 from alehel/claude/issue-1230-c0c8eb
craft-audio: write AAC, ALAC, MP3, AC-3 and E-AC-3 files
2026-11-14 11:46:38 -05:00