diff options
author | wm4 <wm4@nowhere> | 2015-03-02 19:09:36 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-02 19:09:36 +0100 |
commit | a4b6bf8c41b54554286117b97e78412a32b5147f (patch) | |
tree | fa745bdb50a2cf0c51e99aa710b042a2e75eba08 /demux/demux_playlist.c | |
parent | 01b87e509c292189acdd96bc7a216b50eafbce9e (diff) | |
download | mpv-a4b6bf8c41b54554286117b97e78412a32b5147f.tar.bz2 mpv-a4b6bf8c41b54554286117b97e78412a32b5147f.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.
Diffstat (limited to 'demux/demux_playlist.c')
-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 c0e868d209..13f1fe6ac3 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 |