diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-06-23 13:56:16 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-06-29 16:58:28 +0300 |
commit | 67ff79e412e9d47d96356cd46e519b9c030c0f43 (patch) | |
tree | 72aa26c94776456361f415f78f973aed2922ee84 /src/libsync | |
parent | df4a2f10eed62570aec479a6737cae68fc89b98f (diff) |
Oauth: case insensitive username compare
Diffstat (limited to 'src/libsync')
-rw-r--r-- | src/libsync/creds/oauth.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsync/creds/oauth.cpp b/src/libsync/creds/oauth.cpp index 28ae21744..ef6f6259d 100644 --- a/src/libsync/creds/oauth.cpp +++ b/src/libsync/creds/oauth.cpp @@ -381,7 +381,8 @@ void OAuth::refreshAuthentication(const QString &refreshToken) void OAuth::finalize(const QPointer<QTcpSocket> &socket, const QString &accessToken, const QString &refreshToken, const QString &user, const QUrl &messageUrl) { - if (!_account->davUser().isNull() && user != _account->davUser()) { + // dav user names are case insensetive, we might compare a user input with the string provided by the server + if (!_account->davUser().isEmpty() && user.compare(_account->davUser(), Qt::CaseInsensitive) != 0) { // Connected with the wrong user qCWarning(lcOauth) << "We expected the user" << _account->davUser() << "but the server answered with user" << user; const QString message = tr("<h1>Wrong user</h1>" |