mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-08-26 22:03:43 +03:00
[pp/exec] Restrict --exec template usage to safe conversions (#16883)
Authored by: bashonly
This commit is contained in:
+2
-1
@@ -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}')
|
||||
|
||||
Reference in New Issue
Block a user