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

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


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

Allow subs dl url starting by "https" only

> https://code.videolan.org/videolan/vlc-android/commit/39f6172bec054553aa9c219c941559fb71abf2c3
---

 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 d6a3f25e8..b3f47c02e 100644
--- a/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
+++ b/vlc-android/src/org/videolan/vlc/util/SubtitlesDownloader.java
@@ -330,8 +330,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