[pp/exec] Restrict --exec template usage to safe conversions (#16883)

Authored by: bashonly
This commit is contained in:
bashonly
2026-06-06 21:24:53 +00:00
committed by GitHub
parent 7aac95eae6
commit 5faffa999f
7 changed files with 103 additions and 15 deletions
+2 -1
View File
@@ -44,6 +44,7 @@ from .utils import (
GeoUtils,
PlaylistEntries,
SameFileError,
UnsafeExecExpansionError,
download_range_func,
expand_path,
float_or_none,
@@ -1077,7 +1078,7 @@ def main(argv=None):
IN_CLI.value = True
try:
_exit(*variadic(_real_main(argv)))
except (CookieLoadError, DownloadError):
except (CookieLoadError, DownloadError, UnsafeExecExpansionError):
_exit(1)
except SameFileError as e:
_exit(f'ERROR: {e}')