UUID in DB client ping should uniquely identify the client machine

This commit is contained in:
Mat Sutcliffe
2020-12-17 20:24:01 +00:00
parent f2eba38282
commit 584595ff2f

View File

@@ -19,6 +19,7 @@
#include <QVersionNumber> #include <QVersionNumber>
#include <QJsonObject> #include <QJsonObject>
#include <QSysInfo>
#include <QStringList> #include <QStringList>
#include <QStringBuilder> #include <QStringBuilder>
@@ -168,11 +169,7 @@ namespace BlackCore
CUrl pingUrl = this->getDbClientPingServiceUrl(); CUrl pingUrl = this->getDbClientPingServiceUrl();
if (pingUrl.isEmpty()) { CUrl(); } if (pingUrl.isEmpty()) { CUrl(); }
QString uuid = this->identifier().toUuidString(); pingUrl.appendQuery("uuid", QSysInfo::machineUniqueId());
uuid.remove('{');
uuid.remove('}');
pingUrl.appendQuery("uuid", uuid);
if (type.testFlag(PingLogoff)) { pingUrl.appendQuery("logoff", "true"); } if (type.testFlag(PingLogoff)) { pingUrl.appendQuery("logoff", "true"); }
if (type.testFlag(PingShutdown)) { pingUrl.appendQuery("shutdown", "true"); } if (type.testFlag(PingShutdown)) { pingUrl.appendQuery("shutdown", "true"); }
if (type.testFlag(PingStarted)) { pingUrl.appendQuery("started", "true"); } if (type.testFlag(PingStarted)) { pingUrl.appendQuery("started", "true"); }