Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ownCloud admins and users.

## Summary

* Bugfix - Token request with Bearer returns error: [#4080](https://github.com/owncloud/android/issues/4080)
* Bugfix - Side menu collapses info in landscape: [#4513](https://github.com/owncloud/android/issues/4513)
* Bugfix - Content in Spaces not shown from third-party apps: [#4522](https://github.com/owncloud/android/issues/4522)
* Bugfix - Add bottom margin for used quota in account dialog: [#4566](https://github.com/owncloud/android/issues/4566)
Expand All @@ -50,6 +51,16 @@ ownCloud admins and users.

## Details

* Bugfix - Token request with Bearer returns error: [#4080](https://github.com/owncloud/android/issues/4080)

A new condition has been added into the network client to check if the network
request comes from TokenRequestRemoteOperation before setting the authorization
header. This allows users to have more than one logged-in account on the same
server.

https://github.com/owncloud/android/issues/4080
https://github.com/owncloud/android/pull/4586

* Bugfix - Side menu collapses info in landscape: [#4513](https://github.com/owncloud/android/issues/4513)

Two empty and visual items have been added to prevent the drawer from collapsing
Expand Down
7 changes: 7 additions & 0 deletions changelog/unreleased/4586
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Token request with Bearer returns error

A new condition has been added into the network client to check if the network request comes from TokenRequestRemoteOperation
before setting the authorization header. This allows users to have more than one logged-in account on the same server.

https://github.com/owncloud/android/issues/4080
https://github.com/owncloud/android/pull/4586
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class OwnCloudClient extends HttpClient {
public static final String WEBDAV_FILES_PATH_4_0 = "/remote.php/dav/files/";
public static final String STATUS_PATH = "/status.php";
private static final String WEBDAV_UPLOADS_PATH_4_0 = "/remote.php/dav/uploads/";
private static final String KONNECT_V1_TOKEN_PATH = "/konnect/v1/token";
private static final int MAX_RETRY_COUNT = 2;

private static int sIntanceCounter = 0;
Expand Down Expand Up @@ -131,7 +132,8 @@ private int saveExecuteHttpMethod(HttpBaseMethod method) throws Exception {
method.setRequestHeader(HttpConstants.USER_AGENT_HEADER, SingleSessionManager.getUserAgent());
method.setRequestHeader(HttpConstants.ACCEPT_LANGUAGE_HEADER, Locale.getDefault().getLanguage());
method.setRequestHeader(HttpConstants.ACCEPT_ENCODING_HEADER, HttpConstants.ACCEPT_ENCODING_IDENTITY);
if (mCredentials.getHeaderAuth() != null && !mCredentials.getHeaderAuth().isEmpty()) {
if (mCredentials.getHeaderAuth() != null && !mCredentials.getHeaderAuth().isEmpty()
&& !method.getHttpUrl().encodedPath().equals(KONNECT_V1_TOKEN_PATH)) {
method.setRequestHeader(AUTHORIZATION_HEADER, mCredentials.getHeaderAuth());
}

Expand Down
Loading