mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-07 06:34:40 +01:00
Merge pull request #5861 from ByteHamster/fix-sending-empty-credentials
Do not send null:null as credentials
This commit is contained in:
commit
ed5d9212ea
@ -47,7 +47,9 @@ public class BasicAuthorizationInterceptor implements Interceptor {
|
|||||||
if (request.tag() instanceof DownloadRequest) {
|
if (request.tag() instanceof DownloadRequest) {
|
||||||
DownloadRequest downloadRequest = (DownloadRequest) request.tag();
|
DownloadRequest downloadRequest = (DownloadRequest) request.tag();
|
||||||
userInfo = URIUtil.getURIFromRequestUrl(downloadRequest.getSource()).getUserInfo();
|
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();
|
userInfo = downloadRequest.getUsername() + ":" + downloadRequest.getPassword();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user