Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 033e682

Browse files
theScrabiabelgardep
authored andcommitted
prevent acumulating cookies on account change
1 parent f8904dc commit 033e682

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/SingleSessionManager.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ public OwnCloudClient getClientFor(OwnCloudAccount account, Context context) thr
111111
account.getBaseUri(),
112112
context.getApplicationContext(),
113113
true); // TODO remove dependency on OwnCloudClientFactory
114+
115+
//the next two lines are a hack because okHttpclient is used as a singleton instead of being an
116+
//injected instance that can be deleted when required
117+
client.clearCookies();
118+
client.clearCredentials();
119+
114120
client.setAccount(account);
115121
HttpClient.setContext(context);
116122

0 commit comments

Comments
 (0)