diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-04-26 19:09:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-26 19:09:18 +0200 |
commit | ed5d9212ead125499f95bb175274e4451c029400 (patch) | |
tree | f587c150aaebeba4fdd2961c2de2b464480319ed /core/src/main | |
parent | 26faaf52c6fdc788397c31419ef5a97ba829f09e (diff) | |
parent | fc91229b5dbd258795a670d2c740962f85b13da7 (diff) | |
download | AntennaPod-ed5d9212ead125499f95bb175274e4451c029400.zip |
Merge pull request #5861 from ByteHamster/fix-sending-empty-credentials
Do not send null:null as credentials
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java b/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java index bea064cf1..53160e242 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/BasicAuthorizationInterceptor.java @@ -47,7 +47,9 @@ public class BasicAuthorizationInterceptor implements Interceptor { if (request.tag() instanceof DownloadRequest) { DownloadRequest downloadRequest = (DownloadRequest) request.tag(); userInfo = URIUtil.getURIFromRequestUrl(downloadRequest.getSource()).getUserInfo(); - if (TextUtils.isEmpty(userInfo)) { + if (TextUtils.isEmpty(userInfo) + && (!TextUtils.isEmpty(downloadRequest.getUsername()) + || !TextUtils.isEmpty(downloadRequest.getPassword()))) { userInfo = downloadRequest.getUsername() + ":" + downloadRequest.getPassword(); } } else { |