From 59c1fdbe0530916520686af71eef17b2375b912f Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 24 Jan 2017 13:09:38 +0100 Subject: [PATCH] Shib: Use different keychain entry per account #5469 Previously shib multiaccount didn't work at all because the session cookie was stored in the same keychain entry. --- src/gui/creds/shibbolethcredentials.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/creds/shibbolethcredentials.cpp b/src/gui/creds/shibbolethcredentials.cpp index 5d0b21c252b..664294b2e67 100644 --- a/src/gui/creds/shibbolethcredentials.cpp +++ b/src/gui/creds/shibbolethcredentials.cpp @@ -130,7 +130,7 @@ void ShibbolethCredentials::fetchFromKeychain() ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName()); job->setSettings(Utility::settingsWithGroup(Theme::instance()->appName(), job).release()); job->setInsecureFallback(false); - job->setKey(keychainKey(_account->url().toString(), "shibAssertion")); + job->setKey(keychainKey(_account->url().toString(), user())); connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotReadJobDone(QKeychain::Job*))); job->start(); } @@ -309,7 +309,7 @@ void ShibbolethCredentials::storeShibCookie(const QNetworkCookie &cookie) job->setSettings(Utility::settingsWithGroup(Theme::instance()->appName(), job).release()); // we don't really care if it works... //connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotWriteJobDone(QKeychain::Job*))); - job->setKey(keychainKey(_account->url().toString(), "shibAssertion")); + job->setKey(keychainKey(_account->url().toString(), user())); job->setTextData(QString::fromUtf8(cookie.toRawForm())); job->start(); } @@ -318,7 +318,7 @@ void ShibbolethCredentials::removeShibCookie() { DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName()); job->setSettings(Utility::settingsWithGroup(Theme::instance()->appName(), job).release()); - job->setKey(keychainKey(_account->url().toString(), "shibAssertion")); + job->setKey(keychainKey(_account->url().toString(), user())); job->start(); }