Commit Graph
20 Commits
Author SHA1 Message Date
Afonsop c6db94e86f fix: native-bpp decode accounting, GIF frame bombs, streaming remote bodies
A second adversarial round (with empirical reproduction against the
vendored image 0.25) found the budget contract still had holes:

- The probe billed 4 bytes/px, but 16-bit formats allocate their
  native layout during decode (8/px for RGBA16 PNG; TIFF stacks ~3x
  codec scratch on top). In-budget 16-bit images were falsely refused
  with self-contradictory notes, and the decode transient could exceed
  the budget the tiers claimed to enforce. The probe now reads the
  color type alongside the dimensions and bills the real peak (native
  layout + RGBA where they coexist, plus the TIFF codec factor), so
  refusals are honest and per-platform-correct, and the TIFF allowance
  follows the same accounting.
- GIF: the probe reads the LOGICAL SCREEN, but a crafted frame may
  declare itself arbitrarily larger (empirically: a 10x10 probed
  screen with an 8192x8192 frame — 320 MB and 29 s from a
  probe-claimed-400-byte image). The GIF frame buffer is now capped
  to the probed size plus slack; frame bombs refuse like any other
  oversize.
- Remote bodies on web streamed incrementally with the 64 MB cap
  enforced DURING the read (array_buffer() materialized a hostile
  chunked reply in full before any check could fire), aborting and
  cancelling the reader the moment the cap is crossed.
- Degenerate raster entities (zero/non-finite size or vectors) no
  longer produce NaN placement math that aborted whole PDF exports —
  they resolve to the broken-reference placeholder.
- Same-name resolution now has a deterministic winner (newest
  registration, via insertion order) instead of HashMap iteration
  order; URL query strings no longer break by-name matching; the
  image pick matches its refusal note by the quoted file name
  (substring collisions like a.tif/2011.tif attributed errors to the
  wrong file); a dropped remote outcome at the queue cap triggers one
  unconditional catch-up re-resolution instead of waiting for another
  event; the unknown-size refusal says so instead of printing 0x0;
  and the build script fails cleanly when there are no fonts to
  verify.
2026-09-18 06:23:30 +01:00
Afonsop 58d3789bcf fix: trust the probe for over-budget images; TIFF allowance; build wrapper
Review of the image wave (with empirical reproduction against the
vendored image 0.25) found the budget contract did not hold across
formats: the decoder's Limits reserve checks NATIVE bytes-per-pixel,
so a grayscale/RGB JPEG/PNG/BMP over the RGBA budget decoded anyway
and into_rgba8() then ballooned to up to 4x it — the tab death the
budgets exist to prevent. The probed dimensions already prove an
OverBudget image cannot fit, so it is now refused without decoding,
removing all dependence on per-decoder limit fidelity.

Conversely, image's TIFF codec stacks ~3x scratch buffers on top of
the reserve, so an in-budget TIFF (the flagship GIS scenario) was
refused with a self-contradictory note ('400 MB, over the 512 MB
limit'); the decoder allowance for TIFF is now 3x while tier math
stays on the real budget.

Also: the refusal message saturates instead of overflowing on crafted
headers, the image pick only matches the refusal note naming ITS file
(peek, not drain — other references' notes survive for their own
drains), and the Georgian Supplement range ends at U+2D2F (U+2D30.. is
Tifinagh, which ships no font).

Build tooling: the font files missing from dist was a trunk
finalize_dist failure (Windows file-lock during the dist wipe; staging
had them, the exit code was missed) — not a copy-dir skip; it did not
reproduce in two clean cycles. scripts/build-web.sh is now the
canonical wrapper (MSYS_NO_PATHCONV, trunk, font copy + byte
verification that hard-fails), wired into README, Trunk.toml, and the
Pages workflow.
2026-09-18 05:15:37 +01:00
Afonsop e3c86eca29 build: make the Trunk web-worker hook work on Windows
Trunk passes TRUNK_STAGING_DIR as an extended-length path (\?\C:\...)
on Windows, which MSYS sh tools cannot stat, so post_build failed and
the whole web build aborted. Strip the prefix with sed before use;
Linux CI paths are unaffected. Also apply rustfmt to pdf_export.rs.
2026-09-15 18:54:44 +01:00
Hakan Seven 95bad2a3b2 Fix web folder paths and allow main-only web hotfix deployment 2026-09-13 20:30:12 +03:00
Hakan Seven 9f303c8b5a Use actual release download counts 2026-09-12 21:16:19 +03:00
Hakan Seven 6280ae6316 fix(ci): keep Pages validation site-scoped 2026-09-09 22:05:56 +03:00
Hakan Seven cf70d60944 fix(site): consolidate homepage search signals 2026-09-09 21:58:38 +03:00
Hakan Seven 9b112e3ac0 fix: finalize reviewed drawing and interaction paths
Reset stale geometry when automation replaces a drawing and resolve material paths from its directory. Cover precise indexed snapping, large-coordinate line intersections, leader ordering, invalid image buffers and browser clipboard fallback. Preserve Options dialog resizing.

Validation: cargo test --workspace --all-features (866 passed); wasm32 application check; Node clipboard regression check; Python binding tests (3 passed).
2026-09-09 13:33:14 +03:00
Hakan Seven 143703d809 Improve website translations and favicons; disable push workflows 2026-09-07 01:19:39 +03:00
Hakan Seven d66e89ca19 Complete application localization across all supported languages 2026-09-07 01:05:02 +03:00
Hakan Seven 8eafbc6899 Refresh shared website and README screenshots 2026-09-06 14:40:42 +03:00
Hakan Seven 2d06004c1f Balance all website sections and improve mobile navigation 2026-09-06 13:58:32 +03:00
Hakan Seven 4a5adf90a5 Localize website in all supported languages and refresh site icons 2026-09-06 13:32:37 +03:00
Hakan Seven 13afc1479f Automate weekly releases and synchronize application versions 2026-09-05 02:13:20 +03:00
Hakan Seven ffc9a6cc33 docs(readme): split project growth charts 2026-09-02 23:37:43 +03:00
Hakan Seven c465bcf624 feat(web): add SEO landing page 2026-08-22 09:33:38 +03:00
Hakan Seven 3d2848021f feat(readme): combine growth metrics 2026-08-13 21:48:47 +03:00
Hakan Seven 2c01692d63 feat: self-host star history 2026-08-04 12:42:04 +03:00
Hakan Seven bca65600cd fix: stabilize web loading and paper rendering 2026-07-25 21:34:29 +03:00
Hakan Seven deec48ad99 perf: keep heavy work off UI thread 2026-07-25 18:49:18 +03:00