diff options
author | wm4 <wm4@nowhere> | 2015-03-02 19:09:36 +0100 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-03-03 16:08:43 +0900 |
commit | 78349cc188a2b6f98419c112c3bd4bc337f9b0cc (patch) | |
tree | e5e075fcad93ec17c676f76458379df779cbc261 /demux | |
parent | 931f6142572ce50558f6e8b0b25c5f2e28f6ab9f (diff) | |
download | mpv-78349cc188a2b6f98419c112c3bd4bc337f9b0cc.tar.bz2 mpv-78349cc188a2b6f98419c112c3bd4bc337f9b0cc.tar.xz |
player: refine rar:// playlist-safety handling
It was possible to make the player play local files by putting rar://
links into remote playlists, and some other potentially unsafe things.
Redo the handling of it. Now the rar-redirector (the thing in
demux_playlist.c) sets disable_safety, which makes the player open any
playlist entries returned. This is fine, because it redirects to the
same file anyway (just with different selection/interpretation of the
contents). On the other hand, rar:// itself is now considered fully
unsafe, which means that it is ignored if found in normal playlists.
(cherry picked from commit a4b6bf8c41b54554286117b97e78412a32b5147f)
Diffstat (limited to 'demux')
-rw-r--r-- | demux/demux_playlist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/demux/demux_playlist.c b/demux/demux_playlist.c index 50c46ae41a..9602eaf622 100644 --- a/demux/demux_playlist.c +++ b/demux/demux_playlist.c @@ -201,6 +201,7 @@ static int parse_rar(struct pl_parser *p) if (RarParse(p->s, &count, &files)) return -1; + p->pl->disable_safety = true; // make it load rar:// char *prefix = mp_url_escape(p, p->real_stream->url, "~|"); for (int n = 0; n < count; n++) { // stream_rar.c does the real work |