From d433f0e08e919b57fc02e83b39144efff2b351ad Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 3 Jan 2017 11:39:10 +0100 Subject: [PATCH] HTTPCreds: remove all cookies when logging out (#5383) Some custom server use persistent cookies with the auth token. So we should clear all the cookies when disconnecting. Account::clearCookieJar is only called from the HTTPCredentials. This funciton is not used for shibboleth. There is probably no reasons to keep the HTTP cookie anyway. Issue #5370 --- src/libsync/account.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 6ddc86833..723aa1671 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -148,10 +148,14 @@ QUrl Account::davUrl() const return Utility::concatUrlPath(url(), davPath()); } +/** + * clear all cookies. (Session cookies or not) + */ void Account::clearCookieJar() { Q_ASSERT(qobject_cast(_am->cookieJar())); - static_cast(_am->cookieJar())->clearSessionCookies(); + static_cast(_am->cookieJar())->setAllCookies(QList()); + emit wantsAccountSaved(this); } /*! This shares our official cookie jar (containing all the tasty -- 2.30.2