From a1f1a1f5960de4ce42fc528f8c36baa4c1e635a5 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 6 Feb 2024 16:09:38 +0100 Subject: [PATCH] Strip user info from URL in New Connection Wizard Authentication is done through the web browser, so no user information is needed for that URL. Fixes: #11497 --- changelog/unreleased/11497 | 8 ++++++++ src/gui/newwizard/states/serverurlsetupwizardstate.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/11497 diff --git a/changelog/unreleased/11497 b/changelog/unreleased/11497 new file mode 100644 index 00000000000..ca8cc85f496 --- /dev/null +++ b/changelog/unreleased/11497 @@ -0,0 +1,8 @@ +Bugfix: strip user information from new-connection URL + +Credentials in the URL are not supported for some time. This fix strips +them from the URL before storage and using it to authenticate the client +to the server. + +https://github.com/owncloud/client/issues/11497 +https://github.com/owncloud/client/pull/11509 diff --git a/src/gui/newwizard/states/serverurlsetupwizardstate.cpp b/src/gui/newwizard/states/serverurlsetupwizardstate.cpp index bd9164a345f..50046804da3 100644 --- a/src/gui/newwizard/states/serverurlsetupwizardstate.cpp +++ b/src/gui/newwizard/states/serverurlsetupwizardstate.cpp @@ -72,7 +72,7 @@ void ServerUrlSetupWizardState::evaluatePage() userProvidedUrl.prepend(defaultUrlSchemeC); } - return QUrl::fromUserInput(userProvidedUrl); + return QUrl::fromUserInput(userProvidedUrl).adjusted(QUrl::RemoveUserInfo); }(); // (ab)use the account builder as temporary storage for the URL we are about to probe (after sanitation)