Skip to content

Commit

Permalink
fix: OAuth and WebDAV (#12017)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 authored Dec 11, 2024
1 parent d1d3041 commit 3d62e62
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion changelog/2.9.0_2021-09-08/4542.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
4 changes: 2 additions & 2 deletions changelog/2.9.0_2021-09-08/8901.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions changelog/2.9.0_2021-09-08/8940.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion changelog/3.0.0_2022-11-30/10239.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion changelog/3.0.0_2022-11-30/9772.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion changelog/4.0.0_2023-05-11/10654.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/csync/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/gui/connectionvalidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.";

Expand Down
2 changes: 1 addition & 1 deletion src/gui/fetchserversettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/folder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/gui/folderman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/folderman.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/libsync/abstractnetworkjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/libsync/account.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/creds/oauth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libsync/owncloudpropagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/propagatedownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -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/".
Expand Down

0 comments on commit 3d62e62

Please sign in to comment.