Allow logging-in with an email that contains a '+' sign.

Previously, attempts to login using an email such as "my+name@example.com" didn't work because the username wasn't
URL-encoded when it was sent to the server, so on the server the '+' was changed to a space.
This commit is contained in:
Oren Hurvitz 2018-12-27 12:55:52 +02:00
parent 8ff47659d3
commit 3d5035886c

View file

@ -536,7 +536,7 @@ void AccountManager::requestAccessToken(const QString& login, const QString& pas
QByteArray postData;
postData.append("grant_type=password&");
postData.append("username=" + login + "&");
postData.append("username=" + QUrl::toPercentEncoding(login) + "&");
postData.append("password=" + QUrl::toPercentEncoding(password) + "&");
postData.append("scope=" + ACCOUNT_MANAGER_REQUESTED_SCOPE);