From 5ea84e17c03dc86222fbda5c60f2ff00152b8017 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 1 Sep 2014 00:12:47 +0200 Subject: player: don't allow remote playlists to load local files Because that might be a bad idea. Note that remote playlists still can use any protocol marked with is_safe and is_network, because the case of http-hosted playlists containing URLs using other streaming protocols is not unusual. --- common/playlist.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/playlist.h b/common/playlist.h index 916d21bf45..6c609733da 100644 --- a/common/playlist.h +++ b/common/playlist.h @@ -41,9 +41,12 @@ struct playlist_entry { bool playback_short : 1; // Set to true if not at least 1 frame (audio or video) could be played. bool init_failed : 1; - // If set, assume that this is e.g. from an external playlist, and needs an - // additional safety check. - bool unsafe_origin : 1; + // Used to reject loading of unsafe entries from external playlists. + // Can have any of the following bit flags set: + // STREAM_SAFE_ONLY: only allow streams marked with is_safe + // STREAM_NETWORK_ONLY: only allow streams marked with is_network + // The value 0 allows everything. + int stream_flags; }; struct playlist { -- cgit v1.2.3