Repository navigation
fix: run ffmpeg and ffprobe without a shell - #351
Merged
Merged
Conversation
- chapter-merger, bulk-import-scanner: ffprobe, ffmpeg decode checks and `ffmpeg -encoders` use execFile with argv arrays; the merge builds its argv directly for spawn instead of tokenizing a command string - metadata values are passed verbatim, which also fixes titles containing `"` gaining a stray leading quote or backslashes - disk space check uses fs.statfs instead of a df|tail|awk pipeline - concat merge: limit inputs with -protocol_whitelist file,pipe and refuse file names containing control characters (the list format is line-based); such books fall back to organizing files individually - tests: real ffmpeg/ffprobe round-trip with metacharacter file names (skips when the binaries are absent) plus argv-level unit tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- concat inputs may only use the file protocol (drop pipe) - refuse only paths containing a line break or NUL (the characters that end a concat list line); report the full path - strip CR and NUL as well as LF from chapter titles in the ffmetadata file - move argv/list-file safety tests to chapter-merger-argv.test.ts and assert the concat list content directly - correct the statfs disk-space comment Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kikootwo
added a commit
that referenced
this pull request
Oct 19, 2026
.dockerignore: keep main's redis + .claude entries and the e2e/ line. documentation/testing.md: list all three workflows plus the e2e harness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kikootwo
added a commit
that referenced
this pull request
Oct 19, 2026
- port the media-tools-without-a-shell acceptance spec into e2e/specs/regressions/sec-shell-exec.spec.ts (bridge exec + new read-only logs op, control token); skipped on tainted runs - exec bridge: read-only logs operation; host tests for request validation, tainted refusal and token checks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
Merged
kikootwo
added a commit
that referenced
this pull request
Oct 19, 2026
Adds the e2e/ harness: disposable Docker stacks with fake Prowlarr, qBittorrent, SABnzbd and Plex and a real Audiobookshelf, specs in a pinned Playwright container (smoke on both backends, upgrade from 1.2.3, regression specs for #242, #275 and #351), containerized offline unit runs, and an explicit trusted/tainted declaration with tainted mode switched off until build-time isolation lands. e2e/ is excluded from the app image and build. Harness self-tests, unit suite and stack runs passed; PR Tests passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
"getting a stray leading quote or backslashes.fs.statfsinstead of adf | tail | awkpipeline.fileprotocol only. A book whose file names contain a line break (which the list format can't hold) is organized as individual files instead of merged.Why
Building shell command strings out of file names is fragile. Quotes and special characters in a book's folder name could break probing and merging, and paths don't need to go through a shell at all.
Evidence
Full logs: https://gist.github.com/kikootwo/73320e52e0cafe0af9b0e0d5514cc32d
Checks
dockerfile.unified): PASS, ffmpeg 9.0.2 in the imageRisk and rollback
This changes every ffmpeg and ffprobe call site (probe, merge, tagging, the encoder check). The unit and end-to-end runs above cover them. Reverting this PR restores the previous invocation.
🤖 Generated with Claude Code