mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Use full user id at host with port for proxy password keychain
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
ef59399804
commit
37c77d81ec
1 changed files with 2 additions and 2 deletions
|
@ -360,7 +360,7 @@ void AccountManager::saveAccountHelper(Account *acc, QSettings &settings, bool s
|
||||||
settings.setValue(networkUploadLimitC, acc->uploadLimit());
|
settings.setValue(networkUploadLimitC, acc->uploadLimit());
|
||||||
settings.setValue(networkDownloadLimitC, acc->downloadLimit());
|
settings.setValue(networkDownloadLimitC, acc->downloadLimit());
|
||||||
|
|
||||||
const auto proxyPasswordKey = QString(acc->davUser() + networkProxyPasswordKeychainKeySuffixC);
|
const auto proxyPasswordKey = QString(acc->userIdAtHostWithPort() + networkProxyPasswordKeychainKeySuffixC);
|
||||||
if (const auto proxyPassword = acc->proxyPassword(); proxyPassword.isEmpty()) {
|
if (const auto proxyPassword = acc->proxyPassword(); proxyPassword.isEmpty()) {
|
||||||
const auto job = new QKeychain::DeletePasswordJob(Theme::instance()->appName(), this);
|
const auto job = new QKeychain::DeletePasswordJob(Theme::instance()->appName(), this);
|
||||||
job->setKey(proxyPasswordKey);
|
job->setKey(proxyPasswordKey);
|
||||||
|
@ -525,7 +525,7 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings)
|
||||||
acc->setUploadLimit(settings.value(networkUploadLimitC).toInt());
|
acc->setUploadLimit(settings.value(networkUploadLimitC).toInt());
|
||||||
acc->setDownloadLimit(settings.value(networkDownloadLimitC).toInt());
|
acc->setDownloadLimit(settings.value(networkDownloadLimitC).toInt());
|
||||||
|
|
||||||
const auto proxyPasswordKey = QString(acc->davUser() + networkProxyPasswordKeychainKeySuffixC);
|
const auto proxyPasswordKey = QString(acc->userIdAtHostWithPort() + networkProxyPasswordKeychainKeySuffixC);
|
||||||
const auto job = new QKeychain::ReadPasswordJob(Theme::instance()->appName(), this);
|
const auto job = new QKeychain::ReadPasswordJob(Theme::instance()->appName(), this);
|
||||||
job->setKey(proxyPasswordKey);
|
job->setKey(proxyPasswordKey);
|
||||||
connect(job, &QKeychain::Job::finished, this, [acc](const QKeychain::Job *const incomingJob) {
|
connect(job, &QKeychain::Job::finished, this, [acc](const QKeychain::Job *const incomingJob) {
|
||||||
|
|
Loading…
Reference in a new issue