From b5efb1d6647212503de9a43abd3976bdc6de83f4 Mon Sep 17 00:00:00 2001 From: davigonz Date: Wed, 8 May 2019 16:16:18 +0200 Subject: [PATCH] Use UTF-8 when encoding authorization headers --- .../lib/common/authentication/OwnCloudBasicCredentials.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/authentication/OwnCloudBasicCredentials.java b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/authentication/OwnCloudBasicCredentials.java index 5a83cf63..ab1ba3ef 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/authentication/OwnCloudBasicCredentials.java +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/authentication/OwnCloudBasicCredentials.java @@ -27,6 +27,7 @@ import com.owncloud.android.lib.common.OwnCloudClient; import com.owncloud.android.lib.common.http.HttpClient; import com.owncloud.android.lib.common.http.HttpConstants; import okhttp3.Credentials; +import okhttp3.internal.Util; public class OwnCloudBasicCredentials implements OwnCloudCredentials { @@ -52,7 +53,7 @@ public class OwnCloudBasicCredentials implements OwnCloudCredentials { HttpClient.deleteHeaderForAllRequests(HttpConstants.COOKIE_HEADER); HttpClient.addHeaderForAllRequests(HttpConstants.AUTHORIZATION_HEADER, - Credentials.basic(mUsername, mPassword)); + Credentials.basic(mUsername, mPassword, Util.UTF_8)); } @Override