diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-05-18 17:29:42 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-05-18 17:36:27 +0300 |
commit | ea059c9ad3738a22eb4b432de3cb42691d1b08ef (patch) | |
tree | 66415f9173e457ff3657b6982d924bc4172165ce /src/gui | |
parent | 76af47465e100b72f5c163572b674203e1f66c26 (diff) |
Fix logout if credentials are invalid
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/connectionvalidator.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp index 8c616e89a..6354cdbc4 100644 --- a/src/gui/connectionvalidator.cpp +++ b/src/gui/connectionvalidator.cpp @@ -184,6 +184,11 @@ void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &in return; } + AbstractCredentials *creds = _account->credentials(); + if (!creds->ready()) { + reportResult(CredentialsNotReady); + return; + } // now check the authentication if (_mode != ConnectionValidator::ValidationMode::ValidateServer) { checkAuthentication(); @@ -194,13 +199,6 @@ void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &in void ConnectionValidator::checkAuthentication() { - AbstractCredentials *creds = _account->credentials(); - - if (!creds->ready()) { - reportResult(CredentialsNotReady); - return; - } - // simply GET the webdav root, will fail if credentials are wrong. // continue in slotAuthCheck here :-) qCDebug(lcConnectionValidator) << "# Check whether authenticated propfind works."; |