From 3d62e62122692ebb4db9143c3607ad9ec54dbfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:38:04 +0100 Subject: [PATCH] fix: OAuth and WebDAV (#12017) --- CHANGELOG.md | 2 +- changelog/2.9.0_2021-09-08/4542.md | 2 +- changelog/2.9.0_2021-09-08/8901.md | 4 ++-- changelog/2.9.0_2021-09-08/8940.md | 4 ++-- changelog/3.0.0_2022-11-30/10239.md | 2 +- changelog/3.0.0_2022-11-30/9772.md | 2 +- changelog/4.0.0_2023-05-11/10654.md | 2 +- src/csync/ChangeLog | 2 +- src/gui/connectionvalidator.cpp | 2 +- src/gui/fetchserversettings.cpp | 2 +- src/gui/folder.h | 2 +- src/gui/folderman.cpp | 2 +- src/gui/folderman.h | 2 +- src/libsync/abstractnetworkjob.h | 2 +- src/libsync/account.h | 2 +- src/libsync/creds/oauth.cpp | 2 +- src/libsync/owncloudpropagator.h | 2 +- src/libsync/propagatedownload.cpp | 2 +- src/libsync/theme.h | 2 +- 19 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d304f4152c8..b71ac9ead17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1712,7 +1712,7 @@ ownCloud admins and users. When using oCIS and spaces with the cmd client the additional parameter `--server` is required. `--server` specifies the URL to the server, while the - positional parameter 'server_url' specifies the webdav URL. + positional parameter 'server_url' specifies the WebDAV URL. https://github.com/owncloud/client/pull/10239 diff --git a/changelog/2.9.0_2021-09-08/4542.md b/changelog/2.9.0_2021-09-08/4542.md index fff2e746b34..b9cba74e602 100644 --- a/changelog/2.9.0_2021-09-08/4542.md +++ b/changelog/2.9.0_2021-09-08/4542.md @@ -1,4 +1,4 @@ -Enhancement: Prefer 127.0.0.1 as oauth redirect URL +Enhancement: Prefer 127.0.0.1 as OAuth redirect URL When using OpenID Connect we now always use http://127.0.0.1 as redirect URL instead of http://localhost, following the recommendations in RFC 8252 (https://tools.ietf.org/html/rfc8252). diff --git a/changelog/2.9.0_2021-09-08/8901.md b/changelog/2.9.0_2021-09-08/8901.md index 9bfcddb93a1..cc72edc28e2 100644 --- a/changelog/2.9.0_2021-09-08/8901.md +++ b/changelog/2.9.0_2021-09-08/8901.md @@ -1,6 +1,6 @@ -Bugfix: Start oauth/password prompt if password is wrong during start up +Bugfix: Start OAuth/password prompt if password is wrong during start up -If the oauth token was invalid during start up we didn't start the oauth process +If the OAuth token was invalid during start up we didn't start the OAuth process and the user needed to manually log out in order to log in again. https://github.com/owncloud/client/issues/8901 diff --git a/changelog/2.9.0_2021-09-08/8940.md b/changelog/2.9.0_2021-09-08/8940.md index 2e25cbbb083..e076d9a7af6 100644 --- a/changelog/2.9.0_2021-09-08/8940.md +++ b/changelog/2.9.0_2021-09-08/8940.md @@ -1,5 +1,5 @@ -Bugfix: Handle timeouts occurring during oauth +Bugfix: Handle timeouts occurring during OAuth -We now handle timeouts occurring during oauth. +We now handle timeouts occurring during OAuth. https://github.com/owncloud/client/pull/8940 diff --git a/changelog/3.0.0_2022-11-30/10239.md b/changelog/3.0.0_2022-11-30/10239.md index 7f4534f278f..10ba6a528e4 100644 --- a/changelog/3.0.0_2022-11-30/10239.md +++ b/changelog/3.0.0_2022-11-30/10239.md @@ -1,6 +1,6 @@ Change: owncloudcmd oCIS support When using oCIS and spaces with the cmd client the additional parameter `--server` is required. -`--server` specifies the URL to the server, while the positional parameter 'server_url' specifies the webdav URL. +`--server` specifies the URL to the server, while the positional parameter 'server_url' specifies the WebDAV URL. https://github.com/owncloud/client/pull/10239 diff --git a/changelog/3.0.0_2022-11-30/9772.md b/changelog/3.0.0_2022-11-30/9772.md index a6450459f93..1a1d44c2057 100644 --- a/changelog/3.0.0_2022-11-30/9772.md +++ b/changelog/3.0.0_2022-11-30/9772.md @@ -1,6 +1,6 @@ Enhancement: Display a correct error when the wrong user was authenticated -When the wrong user was authenticated using oauth we used to display a misleading message. +When the wrong user was authenticated using OAuth we used to display a misleading message. We now also style the html response the client provides to the file browser. https://github.com/owncloud/client/issues/9772 diff --git a/changelog/4.0.0_2023-05-11/10654.md b/changelog/4.0.0_2023-05-11/10654.md index c7367c8be2a..76dd2926834 100644 --- a/changelog/4.0.0_2023-05-11/10654.md +++ b/changelog/4.0.0_2023-05-11/10654.md @@ -1,3 +1,3 @@ -Enhancement: Don't invalidate oauth refresh token on ConnectionRefusedError +Enhancement: Don't invalidate OAuth refresh token on ConnectionRefusedError https://github.com/owncloud/client/issues/10654 diff --git a/src/csync/ChangeLog b/src/csync/ChangeLog index a95a0758916..82cbcb7a1f8 100644 --- a/src/csync/ChangeLog +++ b/src/csync/ChangeLog @@ -210,7 +210,7 @@ version 0.50.9 (first beta version, released 2012-08-30) version 0.50.8 (released 2012-08-10) * Inode equivalent support for Win32 platforms to support rename - * ownCloud supports propagates renames from local to webdav MOVE + * ownCloud supports propagates renames from local to WebDAV MOVE * ownCloud module works with proxy, settings from mirall. * improved CMake modules (openSSL) * Fixed namespace for lastmodified propset. diff --git a/src/gui/connectionvalidator.cpp b/src/gui/connectionvalidator.cpp index fc580e258f5..5b08c2f3a8d 100644 --- a/src/gui/connectionvalidator.cpp +++ b/src/gui/connectionvalidator.cpp @@ -189,7 +189,7 @@ void ConnectionValidator::slotStatusFound(const QUrl &url, const QJsonObject &in void ConnectionValidator::checkAuthentication() { - // simply GET the webdav root, will fail if credentials are wrong. + // simply GET the WebDAV root, will fail if credentials are wrong. // continue in slotAuthCheck here :-) qCDebug(lcConnectionValidator) << "# Check whether authenticated propfind works."; diff --git a/src/gui/fetchserversettings.cpp b/src/gui/fetchserversettings.cpp index fc40062adb5..ec34fdb84e6 100644 --- a/src/gui/fetchserversettings.cpp +++ b/src/gui/fetchserversettings.cpp @@ -119,7 +119,7 @@ void FetchServerSettingsJob::runAsyncUpdates() // ideally we would parent them to the account, but as things are messed up by the shared pointer stuff we can't at the moment // so we just set them free if (_account->capabilities().avatarsAvailable()) { - // the avatar job uses the legacy webdav url and ocis will require a new approach + // the avatar job uses the legacy WebDAV URL and ocis will require a new approach auto *avatarJob = new AvatarJob(_account, _account->davUser(), 128, nullptr); connect(avatarJob, &AvatarJob::avatarPixmap, this, [this](const QPixmap &img) { _account->setAvatar(AvatarJob::makeCircularAvatar(img)); }); avatarJob->start(); diff --git a/src/gui/folder.h b/src/gui/folder.h index 6c47ffc4e36..a528c4cf8ad 100644 --- a/src/gui/folder.h +++ b/src/gui/folder.h @@ -199,7 +199,7 @@ class OWNCLOUDGUI_EXPORT Folder : public QObject QString remotePath() const; /** - * The full remote webdav URL + * The full remote WebDAV URL */ QUrl webDavUrl() const; diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp index 00c05a6d05e..bd01acbfcde 100644 --- a/src/gui/folderman.cpp +++ b/src/gui/folderman.cpp @@ -244,7 +244,7 @@ bool FolderMan::setupFoldersHelper(QSettings &settings, AccountStatePtr account) return defaultPath; }(); - // migration: 2.10 did not specify a webdav URL + // migration: 2.10 did not specify a WebDAV URL if (folderDefinition._webDavUrl.isEmpty()) { folderDefinition._webDavUrl = account->account()->davUrl(); } diff --git a/src/gui/folderman.h b/src/gui/folderman.h index 9e8175c2371..aea7a642c3d 100644 --- a/src/gui/folderman.h +++ b/src/gui/folderman.h @@ -96,7 +96,7 @@ class OWNCLOUDGUI_EXPORT FolderMan : public QObject struct SyncConnectionDescription { /*** -- * The webdav URL for the sync connection. +- * The WebDAV URL for the sync connection. */ QUrl davUrl; diff --git a/src/libsync/abstractnetworkjob.h b/src/libsync/abstractnetworkjob.h index 21f3fcb12b5..2e62754198d 100644 --- a/src/libsync/abstractnetworkjob.h +++ b/src/libsync/abstractnetworkjob.h @@ -60,7 +60,7 @@ class OWNCLOUDSYNC_EXPORT AbstractNetworkJob : public QObject QString path() const { return _path; } /* - * A base Url, for most of the jobs this will be the webdav entry point. + * A base Url, for most of the jobs this will be the WebDAV entry point. */ QUrl baseUrl() const; diff --git a/src/libsync/account.h b/src/libsync/account.h index c36475e9d8f..5255bc7d353 100644 --- a/src/libsync/account.h +++ b/src/libsync/account.h @@ -148,7 +148,7 @@ class OWNCLOUDSYNC_EXPORT Account : public QObject */ QString davPath() const; - /** Returns webdav entry URL, based on url() */ + /** Returns WebDAV entry URL, based on url() */ QUrl davUrl() const; /** Holds the accounts credentials */ diff --git a/src/libsync/creds/oauth.cpp b/src/libsync/creds/oauth.cpp index 37c0031a3bc..499f368297f 100644 --- a/src/libsync/creds/oauth.cpp +++ b/src/libsync/creds/oauth.cpp @@ -78,7 +78,7 @@ QString renderHttpTemplate(const QString &title, const QString &content) auto defaultTimeout() { - // as the oauth process can be interactive we don't want 5min of inactivity + // as the OAuth process can be interactive we don't want 5min of inactivity return qMin(30s, OCC::AbstractNetworkJob::httpTimeout); } diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 8c86afc43fc..80e0cd77e76 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -578,7 +578,7 @@ private Q_SLOTS: const QString _localDir; // absolute path to the local directory. ends with '/' const QString _remoteFolder; // remote folder, ends with '/' - const QUrl _webDavUrl; // full webdav url, might be the same as in the account + const QUrl _webDavUrl; // full WebDAV URL, might be the same as in the account }; /** diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index cf360635b6c..a0ffb440a4f 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -228,7 +228,7 @@ void GETFileJob::slotMetaDataChanged() if (httpStatus == 301 || httpStatus == 302 || httpStatus == 303 || httpStatus == 307 || httpStatus == 308 || httpStatus == 401) { - // Redirects and auth failures (oauth token renew) are handled by AbstractNetworkJob and + // Redirects and auth failures (OAuth token renew) are handled by AbstractNetworkJob and // will end up restarting the job. We do not want to process further data from the initial // request. newReplyHook() will reestablish signal connections for the follow-up request. disconnect(reply(), &QNetworkReply::finished, this, &GETFileJob::slotReadyRead); diff --git a/src/libsync/theme.h b/src/libsync/theme.h index 697ae744cd7..c767f3238bd 100644 --- a/src/libsync/theme.h +++ b/src/libsync/theme.h @@ -265,7 +265,7 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject virtual bool wizardSkipAdvancedPage() const; /** - * Alternative path on the server that provides access to the webdav capabilities + * Alternative path on the server that provides access to the WebDAV capabilities * * Attention: Make sure that this string does NOT have a leading slash and that * it has a trailing slash, for example "remote.php/webdav/".