Merge pull request #3057 from matdb/develop

Fix #3054: use UTF-8 to encode password and username for gpodder auth
This commit is contained in:
H. Lehmann 2019-03-08 22:21:54 +01:00 committed by GitHub
commit 0a9735e7da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
@ -587,7 +588,7 @@ public class GpodnetService {
String result = null;
ResponseBody body = null;
try {
String credential = Credentials.basic(username, password);
String credential = Credentials.basic(username, password, Charset.forName("UTF-8"));
Request authRequest = request.newBuilder().header("Authorization", credential).build();
Response response = httpClient.newCall(authRequest).execute();
checkStatusCode(response);