Skip to content

fix: isolate PDF compression arguments and output paths - #27

Merged
dbpolito merged 5 commits into
masterfrom
fix/pdf-request-safety
Nov 14, 2026
Merged

dbpolito merged 5 commits into
masterfrom
fix/pdf-request-safety

Conversation

@dbpolito

@dbpolito dbpolito commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Harden the existing HTML-to-PDF endpoint without changing its response format or default resolution.

  • Invoke compression with execFile and separate argv rather than interpolate request input into a shell command.
  • Keep PDF output under the service-generated storage path; ignore caller-supplied options.path.
  • Reject invalid resolution, malformed JSON option strings, and non-string HTML with HTTP 400 before filesystem/process side effects. Preserve the legacy ignored-options behavior for non-string options values.
  • Add offline tests against the actual route, including asynchronous compression failure/fallback/cleanup, and a PR test workflow. This starts addressing Add tests #1; it is not full Chromium integration coverage.

Numeric form-field resolutions remain supported. Seven route tests pass on Node 24.22.2. Chromium/filesystem/process dependencies are stubbed in these tests; no image was published. Runtime/Chromium dependency upgrades remain separate work. Deployment documentation calls out the existing authentication, network-isolation, and unsandboxed-browser limitations.

@dbpolito dbpolito mentioned this pull request Nov 13, 2026
@dbpolito
dbpolito merged commit 738d1ff into master Nov 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant