diff options
author | ByteHamster <info@bytehamster.com> | 2019-06-03 12:32:38 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-06-03 12:32:38 +0200 |
commit | ba96311e87dea62458d9aa247d19c60c2815dd95 (patch) | |
tree | e2449aeab6e84423f0c980c10eb76ed6c9d857d4 /core/src/main | |
parent | 405db1f1691bb4f3aa6edff03701dc4a0842617b (diff) | |
download | AntennaPod-ba96311e87dea62458d9aa247d19c60c2815dd95.zip |
Fixed ArrayIndexOutOfBoundsException
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java b/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java index 2e742e979..b75e1630c 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/glide/ApOkHttpUrlLoader.java @@ -139,6 +139,11 @@ class ApOkHttpUrlLoader implements ModelLoader<String, InputStream> { // add authentication String[] auth = authentication.split(":"); + if (auth.length != 2) { + Log.d(TAG, "Invalid credentials for '" + url + "'"); + return chain.proceed(request); + } + String credentials = HttpDownloader.encodeCredentials(auth[0], auth[1], "ISO-8859-1"); Request newRequest = request .newBuilder() |