[vlc-commits] demux: adaptive: reject redirection to local file

Francois Cartegnie git at videolan.org
Wed Oct 16 20:21:14 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 16 19:20:46 2019 +0200| [60a21864f7a3d11620ad8d67080dd4a861193dff] | committer: Francois Cartegnie

demux: adaptive: reject redirection to local file

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

 modules/demux/adaptive/http/HTTPConnection.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp b/modules/demux/adaptive/http/HTTPConnection.cpp
index c0bf3fa9ed..ac2b0f84c1 100644
--- a/modules/demux/adaptive/http/HTTPConnection.cpp
+++ b/modules/demux/adaptive/http/HTTPConnection.cpp
@@ -293,6 +293,11 @@ enum RequestStatus
        !locationparams.getUrl().empty())
     {
         msg_Info(p_object, "%d redirection to %s", replycode, locationparams.getUrl().c_str());
+        if(locationparams.isLocal() && !params.isLocal())
+        {
+            msg_Err(p_object, "redirection to local rejected");
+            return RequestStatus::GenericError;
+        }
         return RequestStatus::Redirection;
     }
     else if (replycode != 200 && replycode != 206)



More information about the vlc-commits mailing list