aboutsummaryrefslogtreecommitdiffhomepage
path: root/common
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-09-01 00:12:47 +0200
committerGravatar wm4 <wm4@nowhere>2014-09-01 00:13:22 +0200
commit5ea84e17c03dc86222fbda5c60f2ff00152b8017 (patch)
tree61f15cc5aa0a22bb6177a4df3530cf53be97529a /common
parent129a7c056a524b33cc4c87c67d7919f8d5894ca3 (diff)
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.
Diffstat (limited to 'common')
-rw-r--r--common/playlist.h9
1 files changed, 6 insertions, 3 deletions
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 {