[vlc-commits] youtube.lua: don't downgrade from HTTPS to HTTP
Pierre Ynard
git at videolan.org
Thu Oct 29 11:00:50 CET 2015
vlc/vlc-2.2 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Oct 29 03:40:39 2015 +0100| [6b18649216bce518b4496d3004f1a0cd1af27ca2] | committer: Jean-Baptiste Kempf
youtube.lua: don't downgrade from HTTPS to HTTP
This can be a security leak. This works as far as vlc.access is
accurate.
(cherry picked from commit b20f17a5a722c176287efedd691d1354cbb649b5)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=6b18649216bce518b4496d3004f1a0cd1af27ca2
---
share/lua/playlist/youtube.lua | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index ada99ac..74c183d 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -33,7 +33,7 @@ function get_arturl()
if not video_id then
return nil
end
- return "http://img.youtube.com/vi/"..video_id.."/default.jpg"
+ return vlc.access.."://img.youtube.com/vi/"..video_id.."/default.jpg"
end
function get_prefres()
@@ -303,7 +303,7 @@ function parse()
-- Without "el=detailpage", /get_video_info fails for many
-- music videos with errors about copyrighted content being
-- "restricted from playback on certain sites"
- path = "http://www.youtube.com/get_video_info?video_id="..video_id..format.."&el=detailpage"
+ path = vlc.access.."://www.youtube.com/get_video_info?video_id="..video_id..format.."&el=detailpage"
vlc.msg.warn( "Couldn't extract video URL, falling back to alternate youtube API" )
end
end
@@ -387,6 +387,6 @@ function parse()
else
format = ""
end
- return { { path = "http://www.youtube.com/watch?v="..video_id..format } }
+ return { { path = vlc.access.."://www.youtube.com/watch?v="..video_id..format } }
end
end
More information about the vlc-commits
mailing list