diff options
author | Ricardo Constantino <wiiaboo@gmail.com> | 2018-02-11 13:18:10 +0000 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-02-12 17:35:52 -0800 |
commit | 408a65cf481544201ade88471876271721c0db47 (patch) | |
tree | b7d30821120fadabcadb8339cf083d3021c22435 | |
parent | 0d893bebdc65d564070c20751a8697c03828da2b (diff) | |
download | mpv-408a65cf481544201ade88471876271721c0db47.tar.bz2 mpv-408a65cf481544201ade88471876271721c0db47.tar.xz |
ytdl_hook: whitelist subtitle URLs as well
This was overlooked when doing the whitelisting for video and audio to
fix #5456.
-rw-r--r-- | player/lua/ytdl_hook.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index 9e94b82cd6..aa628fb2ee 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -270,7 +270,8 @@ local function add_single_video(json) if not (sub_info.data == nil) then sub = "memory://"..sub_info.data - elseif not (sub_info.url == nil) then + elseif not (sub_info.url == nil) and + url_is_safe(sub_info.url) then sub = sub_info.url end @@ -468,7 +469,8 @@ mp.add_hook("on_load", 10, function () local subfile = "edl://" for i, entry in pairs(json.entries) do if not (entry.requested_subtitles == nil) and - not (entry.requested_subtitles[j] == nil) then + not (entry.requested_subtitles[j] == nil) and + url_is_safe(entry.requested_subtitles[j].url) then subfile = subfile..edl_escape(entry.requested_subtitles[j].url) else subfile = subfile..edl_escape("memory://WEBVTT") |