diff options
author | Fabian Müller <fmueller@owncloud.com> | 2022-05-19 14:11:29 +0300 |
---|---|---|
committer | Fabian Müller <fmueller@owncloud.com> | 2022-05-19 14:11:29 +0300 |
commit | 5613bea18b0a4ae63edaeaf3a830f7547f238788 (patch) | |
tree | e5a402fbe64ac55dc568d4777d0969ce200f94a8 | |
parent | d235109b5cf2957cad0443effb05848a2eb743d2 (diff) |
Always reset access manager before resolving URLs and determining auth typework/check-basic-auth-creds-in-wizard
-rw-r--r-- | src/gui/newwizard/setupwizardcontroller.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/newwizard/setupwizardcontroller.cpp b/src/gui/newwizard/setupwizardcontroller.cpp index d28e0655f..5705c2a8e 100644 --- a/src/gui/newwizard/setupwizardcontroller.cpp +++ b/src/gui/newwizard/setupwizardcontroller.cpp @@ -89,9 +89,6 @@ void SetupWizardController::nextStep(std::optional<PageIndex> currentPage, std:: // therefore we clear the certificates storage before resolving the URL _accountBuilder = {}; - _accessManager->deleteLater(); - _accessManager = new AccessManager(this); - const auto *pagePtr = qobject_cast<ServerUrlSetupWizardPage *>(_currentPage); const auto serverUrl = [pagePtr]() { @@ -190,6 +187,11 @@ void SetupWizardController::nextStep(std::optional<PageIndex> currentPage, std:: }); connect(messageBox, &QMessageBox::accepted, this, [this, showFirstPage]() { + // when moving back to this page (or retrying a failed credentials check), we need to make sure existing cookies + // and certificates are deleted from the access manager + _accessManager->deleteLater(); + _accessManager = new AccessManager(this); + // first, we must resolve the actual server URL auto resolveJob = Jobs::ResolveUrlJobFactory(_accessManager).startJob(_accountBuilder.serverUrl()); |