[Android] Allow subs dl url starting by "https" only

Geoffrey Métais git at videolan.org
Thu Jul 12 16:05:55 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jul 12 16:02:34 2018 +0200| [3d6774955045d97dd30df9842aae252394ad40ba] | committer: Geoffrey Métais

Allow subs dl url starting by "https" only

(cherry picked from commit 39f6172bec054553aa9c219c941559fb71abf2c3)

> https://code.videolan.org/videolan/vlc-android/commit/3d6774955045d97dd30df9842aae252394ad40ba
---

 vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
index 9c41f4455..4a842acfe 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -333,8 +333,8 @@ public class SubtitlesDownloader {
         GZIPInputStream gzIS = null;
         URL url;
         HttpURLConnection urlConnection;
-        try {
-            url  = new URL(subUrl);
+        if (subUrl.startsWith("https")) try {
+            url = new URL(subUrl);
             urlConnection = (HttpURLConnection) url.openConnection();
             // We get the first matching subtitle
             f = new FileOutputStream(new File(srtUrl));



More information about the Android mailing list