Remove url, desktop and webloc from safe extensions

See https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-c6mh-fpjc-4pr3

Authored by: Grub4K
This commit is contained in:
Simon Sawicki
2026-06-10 00:39:57 +02:00
parent 3ba1534fa3
commit e578e265f7
2 changed files with 9 additions and 9 deletions
+3 -1
View File
@@ -3395,7 +3395,9 @@ class YoutubeDL:
self.report_warning(
f'Cannot write internet shortcut file because the actual URL of "{info_dict["webpage_url"]}" is unknown')
return True
linkfn = replace_extension(self.prepare_filename(info_dict, 'link'), link_type, info_dict.get('ext'))
linkfn = replace_extension(
self.prepare_filename(info_dict, 'link'), link_type,
info_dict.get('ext'), _allowed_exts=tuple(LINK_TEMPLATES))
if not self._ensure_dir_exists(linkfn):
return False
if self.params.get('overwrites', True) and os.path.exists(linkfn):