mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
block filter and attach flags in custom ffmpeg export args
The ffmpeg argument blocklist missed -filter_complex, -lavfi, -vf, -af, -filter, and -attach. These flags can read arbitrary files via source filters like movie= and amovie=, bypassing the existing -i block. A user with camera access could exploit this through the custom export endpoint.
This commit is contained in:
parent
c2220c89a9
commit
2e4d8ed661
@ -36,7 +36,9 @@ logger = logging.getLogger(__name__)
|
|||||||
DEFAULT_TIME_LAPSE_FFMPEG_ARGS = "-vf setpts=0.04*PTS -r 30"
|
DEFAULT_TIME_LAPSE_FFMPEG_ARGS = "-vf setpts=0.04*PTS -r 30"
|
||||||
TIMELAPSE_DATA_INPUT_ARGS = "-an -skip_frame nokey"
|
TIMELAPSE_DATA_INPUT_ARGS = "-an -skip_frame nokey"
|
||||||
|
|
||||||
# ffmpeg flags that can read from or write to arbitrary files
|
# ffmpeg flags that can read from or write to arbitrary files.
|
||||||
|
# filter flags are blocked because source filters like movie= and
|
||||||
|
# amovie= can read arbitrary files from the filesystem.
|
||||||
BLOCKED_FFMPEG_ARGS = frozenset(
|
BLOCKED_FFMPEG_ARGS = frozenset(
|
||||||
{
|
{
|
||||||
"-i",
|
"-i",
|
||||||
@ -45,6 +47,12 @@ BLOCKED_FFMPEG_ARGS = frozenset(
|
|||||||
"-passlogfile",
|
"-passlogfile",
|
||||||
"-sdp_file",
|
"-sdp_file",
|
||||||
"-dump_attachment",
|
"-dump_attachment",
|
||||||
|
"-filter_complex",
|
||||||
|
"-lavfi",
|
||||||
|
"-vf",
|
||||||
|
"-af",
|
||||||
|
"-filter",
|
||||||
|
"-attach",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user