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
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-05-21 16:28:05 +0300
committerHannah von Reth <vonreth@kde.org>2021-05-26 17:43:25 +0300
commit7b793a444841fb318004ea6061410657e2825517 (patch)
tree4d546d6b138e4b827c726ac61e7eb89e585f356f /src/gui/accountstate.cpp
parent81c78fd0db506c5a38b6ae84976d36ec5bffbb0d (diff)
Ensure cookies are cleared right before the server check
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r--src/gui/accountstate.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index 05f92dfa6..46b89d810 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -21,6 +21,7 @@
#include "logger.h"
#include "configfile.h"
#include "settingsdialog.h"
+#include "theme.h"
#include <QMessageBox>
#include <QSettings>
@@ -262,7 +263,6 @@ void AccountState::checkConnectivity(bool verifyServerState)
}
if (verifyServerState) {
- _account->clearCookieJar();
_queueGuard.block();
}
ConnectionValidator *conValidator = new ConnectionValidator(account());
@@ -273,6 +273,10 @@ void AccountState::checkConnectivity(bool verifyServerState)
// Use a small authed propfind as a minimal ping when we're
// already connected.
if (verifyServerState) {
+ if (Theme::instance()->connectionValidatorClearCookies()) {
+ // clear the cookies directly before we try to validate
+ connect(conValidator, &ConnectionValidator::aboutToStart, _account.get(), &Account::clearCookieJar, Qt::DirectConnection);
+ }
conValidator->checkServer();
} else {
conValidator->checkServerAndUpdate();