[vlc-commits] youtube.lua: don't downgrade from HTTPS to HTTP

Pierre Ynard git at videolan.org
Thu Oct 29 03:59:21 CET 2015


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Oct 29 03:40:39 2015 +0100| [b20f17a5a722c176287efedd691d1354cbb649b5] | committer: Pierre Ynard

youtube.lua: don't downgrade from HTTPS to HTTP

This can be a security leak. This works as far as vlc.access is
accurate.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b20f17a5a722c176287efedd691d1354cbb649b5
---

 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 05076e0..e10bdfe 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()
@@ -301,7 +301,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
@@ -385,6 +385,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