fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern (#8047)

* fix: refuse media paths that ffmpeg's image2 demuxer would read as a pattern

ffmpeg's image2 demuxer reads %d, %03d, %% and a % before a wildcard in an
input path as a pattern of other files, folders included. Every project,
private-file and received-file check approves the literal path, so a
composition could name a placeholder whose pattern reaches images outside
the project and get them back as video frames.

Every ffmpeg and ffprobe input built from a project file now goes through
assertLiteralMediaInput, which refuses such a local path before ffmpeg runs.
The engine's urlInputArgs, the parsers' mediaInputFormatArgs and the
studio-server's new mediaInputArgs all take the input path, so the CLI
snapshot and cloud offload, lint, core grade analysis and studio-server
callers are covered too. URLs and other percent signs, such as %20, are
read as before.

* build(parsers): declare the literal-media-input subpath

* build: raise the parsers packed-size budget for the literal-media-input subpath

The new subpath adds its own built entry, type file and export map rows,
about 2.7 KB packed. It is a separate module so test suites that mock
ff-binaries still run the real path check.

* test(parsers): a harmless name shaped like a pattern is refused too
This commit is contained in:
Michael Wang
2026-11-17 07:28:09 +00:00
committed by GitHub
parent 14c4e4c268
commit fe93f9cd47
24 changed files with 206 additions and 49 deletions
+1 -1
View File
@@ -28,7 +28,7 @@
"unpacked": 737342
},
"@hyperframes/parsers": {
"packed": 212000,
"packed": 215500,
"unpacked": 915000
},
"@hyperframes/player": {