From: Christian Kamm Date: Thu, 26 Mar 2015 10:15:24 +0000 (+0100) Subject: HttpCreds: Delete password from old location. #2186 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1890^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=588129d852898d7695c96b0d701f009a30e04d9e;p=nextcloud-desktop.git HttpCreds: Delete password from old location. #2186 --- diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp index 2d5569d7d..0dd0e745c 100644 --- a/src/libsync/creds/httpcredentials.cpp +++ b/src/libsync/creds/httpcredentials.cpp @@ -336,6 +336,14 @@ void HttpCredentials::invalidateToken() job->setKey(kck); job->start(); + // Also ensure the password is deleted from the deprecated place + // otherwise we'd possibly read and use it again and again. + DeletePasswordJob *job2 = new DeletePasswordJob(Theme::instance()->appName()); + // no job2->setSettings() call here, to make it use the deprecated location. + job2->setInsecureFallback(true); + job2->setKey(kck); + job2->start(); + _account->clearCookieJar(); }