1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-14 11:01:35 +00:00
mpv/DOCS
wm4 d2ef2f98a8 loadfile, ytdl_hook: don't reject EDL-resolved URLs through playlist
The ytdl wrapper can resolve web links to playlists. This playlist is
passed as big memory:// blob, and will contain further quite normal web
links. When playback of one of these playlist entries starts, ytdl is
called again and will resolve the web link to a media URL again.

This didn't work if playlist entries resolved to EDL URLs. Playback was
rejected with a "potentially unsafe URL from playlist" error. This was
completely weird and unexpected: using the playlist entry directly on
the command line worked fine, and there isn't a reason why it should be
different for a playlist entry (both are resolved by the ytdl wrapper
anyway). Also, if the only EDL URL was added via audio-add or sub-add,
the URL was accessed successfully.

The reason this happened is because the playlist entries were marked as
STREAM_SAFE_ONLY, and edl:// is not marked as "safe". Playlist entries
passed via command line directly are not marked, so resolving them to
EDL worked.

Fix this by making the ytdl hook set load-unsafe-playlists while the
playlist is parsed. (After the playlist is parsed, and before the first
playlist entry is played, file-local options are reset again.) Further,
extend the load-unsafe-playlists option so that the playlist entries are
not marked while the playlist is loaded.

Since playlist entries are already verified, this should change nothing
about the actual security situation.

There are now 2 locations which check load_unsafe_playlists. The old one
is a bit redundant now. In theory, the playlist loading code might not
be the only code which sets these flags, so keeping the old code is
somewhat justified (and in any case it doesn't hurt to keep it).

In general, the security concept sucks (and always did). I can for
example not answer the question whether you can "break" this mechanism
with various combinations of archives, EDL files, playlists files,
compromised sites, and so on. You probably can, and I'm fully aware that
it's probably possible, so don't blame me.
2019-09-19 20:37:04 +02:00
..
man loadfile, ytdl_hook: don't reject EDL-resolved URLs through playlist 2019-09-19 20:37:04 +02:00
client-api-changes.rst drm: fix libmpv ABI breakage introduced in 351c083487 2019-09-18 23:59:32 +03:00
compile-windows.md DOCS/compile-windows: remove angleproject-git from deps 2019-07-30 23:57:50 +01:00
contribute.md DOCS/contribute.md: fix a typo 2017-11-30 20:36:09 +01:00
edl-mpv.rst demux, demux_edl: add extension for tracks sourced from separate streams 2019-09-19 20:37:04 +02:00
encoding.rst encode: remove old timestamp handling 2018-05-03 01:08:44 +03:00
interface-changes.rst vo_gpu: x11: remove special vdpau probing, use EGL by default 2019-09-15 20:00:52 +03:00
mplayer-changes.rst
release-policy.md
tech-overview.txt video: change some remaining vo_opengl mentions to vo_gpu 2018-01-20 14:43:49 -08:00
waf-buildsystem.rst