Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-05-18 17:29:42 +0300
committerHannah von Reth <vonreth@kde.org>2022-05-18 17:36:27 +0300
commitea059c9ad3738a22eb4b432de3cb42691d1b08ef (patch)
tree66415f9173e457ff3657b6982d924bc4172165ce /src/gui
parent76af47465e100b72f5c163572b674203e1f66c26 (diff)
Fix logout if credentials are invalid
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/connectionvalidator.cpp12
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.";