[Pkg-owncloud-commits] [owncloud-client] 341/498: HTTP cred: properly forget the password when signing out #3462

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit bdf5029d47c4548044658ccf8d17c950873d01de
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Thu Jul 16 14:15:15 2015 +0200

    HTTP cred: properly forget the password when signing out #3462
    
    QNAM do not sign out by itself, it keeps the password in cache.
    
    Qt5 has a function to clear the cache. On Qt4 we reset the QNAM
---
 src/libsync/creds/httpcredentials.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp
index 70cee4e..4865cc1 100644
--- a/src/libsync/creds/httpcredentials.cpp
+++ b/src/libsync/creds/httpcredentials.cpp
@@ -333,7 +333,15 @@ void HttpCredentials::invalidateToken()
     job2->setKey(kck);
     job2->start();
 
+    // clear the session cookie.
     _account->clearCookieJar();
+
+    // let QNAM fogets about the password
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+    _account->networkAccessManager()->clearAccessCache();
+#else
+    _account->resetNetworkAccessManager();
+#endif
 }
 
 void HttpCredentials::persist()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list