somfytahoma: Fix credential encoding
This fixes the login with passwords that contain HTML special chars.master
parent
ff1355e1a5
commit
c7a94f4a02
|
|
@ -83,7 +83,10 @@ SomfyTahomaRequest *createSomfyTahomaGetRequest(NetworkAccessManager *networkMan
|
|||
|
||||
SomfyTahomaRequest *createSomfyTahomaLoginRequest(NetworkAccessManager *networkManager, const QString &username, const QString &password, QObject *parent)
|
||||
{
|
||||
return createSomfyTahomaPostRequest(networkManager, "/login", "application/x-www-form-urlencoded", QString("userId=" + username + "&userPassword=" + password).toUtf8(), parent);
|
||||
QUrlQuery postData;
|
||||
postData.addQueryItem("userId", username);
|
||||
postData.addQueryItem("userPassword", password);
|
||||
return createSomfyTahomaPostRequest(networkManager, "/login", "application/x-www-form-urlencoded", postData.toString(QUrl::FullyEncoded).toUtf8(), parent);
|
||||
}
|
||||
|
||||
SomfyTahomaRequest *createSomfyTahomaEventFetchRequest(NetworkAccessManager *networkManager, const QString &eventListenerId, QObject *parent)
|
||||
|
|
|
|||
Loading…
Reference in New Issue