From e8e764b8e8f8cf6c4fc979b4edef4f074a7c5536 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 14 Jun 2018 21:24:49 +0200 Subject: [PATCH] trim pushbullet token during setup --- pushbullet/devicepluginpushbullet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushbullet/devicepluginpushbullet.cpp b/pushbullet/devicepluginpushbullet.cpp index cbe5f996..0e4e9cfd 100644 --- a/pushbullet/devicepluginpushbullet.cpp +++ b/pushbullet/devicepluginpushbullet.cpp @@ -42,7 +42,7 @@ DeviceManager::DeviceSetupStatus DevicePluginPushbullet::setupDevice(Device *dev QNetworkRequest request(requestUrl); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); - request.setRawHeader(QByteArray("Access-Token"), device->paramValue(pushNotificationTokenParamTypeId).toByteArray()); + request.setRawHeader(QByteArray("Access-Token"), device->paramValue(pushNotificationTokenParamTypeId).toByteArray().trimmed()); QNetworkReply *reply = hardwareManager()->networkManager()->get(request); connect(reply, &QNetworkReply::finished, this, [this, reply, device](){