From 8d8f63e2a913fcaef186d64f1a031a2528d44429 Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:19:04 +0200 Subject: [PATCH] 1.14.7 --- SandboxiePlus/SandMan/OnlineUpdater.cpp | 26 +++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/SandboxiePlus/SandMan/OnlineUpdater.cpp b/SandboxiePlus/SandMan/OnlineUpdater.cpp index 52f4c42e..83636d86 100644 --- a/SandboxiePlus/SandMan/OnlineUpdater.cpp +++ b/SandboxiePlus/SandMan/OnlineUpdater.cpp @@ -210,22 +210,36 @@ SB_PROGRESS COnlineUpdater::GetSupportCert(const QString& Serial, QObject* recei QString UpdateKey = Params["key"].toString(); QUrlQuery Query; + + bool bHwId = false; if (!Serial.isEmpty()) { Query.addQueryItem("SN", Serial); - if (Serial.length() > 5 && Serial.at(4).toUpper() == 'N') { - wchar_t uuid_str[40]; - theAPI->GetDriverInfo(-2, uuid_str, sizeof(uuid_str)); - Query.addQueryItem("HwId", QString::fromWCharArray(uuid_str)); - } + if (Serial.length() > 5 && Serial.at(4).toUpper() == 'N') + bHwId = true; } + if(!UpdateKey.isEmpty()) Query.addQueryItem("UpdateKey", UpdateKey); + if (Serial.isEmpty() && Params.contains("eMail")) { // Request eval Key + Query.addQueryItem("eMail", Params["eMail"].toString()); + bHwId = true; + } + + if (Params.contains("Name")) + Query.addQueryItem("Name", Params["Name"].toString()); + + if (bHwId) { + wchar_t uuid_str[40]; + theAPI->GetDriverInfo(-2, uuid_str, sizeof(uuid_str)); + Query.addQueryItem("HwId", QString::fromWCharArray(uuid_str)); + } + #ifdef _DEBUG QString Test = Query.toString(); #endif - QUrl Url("https://sandboxie-plus.com/get_cert.php"); + QUrl Url("https://sandboxie-plus.com/get_cert.php?"); Url.setQuery(Query); CUpdatesJob* pJob = new CGetCertJob(Params, this);