mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
OAuth: make sure to encode the '+' in query string
The server understands '+' as a space. Issue #7762
This commit is contained in:
parent
aab8ee3e77
commit
4296ebffee
7
changelog/unreleased/7762
Normal file
7
changelog/unreleased/7762
Normal file
@ -0,0 +1,7 @@
|
||||
Bugfix: Fixed OAuth2 login of user with `+`
|
||||
|
||||
Make sure that the `+` in the user name is properly encoded in the URL
|
||||
opened by the browser when doing an OAuth2 authentication.
|
||||
|
||||
https://github.com/owncloud/client/issues/7762
|
||||
|
||||
@ -171,6 +171,7 @@ QUrl OAuth::authorisationLink() const
|
||||
if (!_expectedUser.isNull())
|
||||
query.addQueryItem("user", _expectedUser);
|
||||
QUrl url = Utility::concatUrlPath(_account->url(), QLatin1String("/index.php/apps/oauth2/authorize"), query);
|
||||
url.setQuery(url.query(QUrl::FullyEncoded).replace('+', QLatin1String("%2B"))); // Issue #7762
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user