From dc8ffb9050f9a44616753207ad8007858ffc1dd5 Mon Sep 17 00:00:00 2001 From: Peter Sykora Date: Sun, 20 Jan 2019 00:49:18 +0100 Subject: [PATCH] [fix] When regenerating license file during the check for updates, include only important system parameters which were picked during last activation [impl] Add mainboard serial as third most important parameter --- src/config/supportedApps.js | 2 +- src/lib/licenseUtil.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config/supportedApps.js b/src/config/supportedApps.js index 7815d5c..ce76d56 100644 --- a/src/config/supportedApps.js +++ b/src/config/supportedApps.js @@ -3,7 +3,7 @@ */ exports.pickParams = function (appId, systemParams) { // if (appId === 'coc') { - const appParams = ['biosSerialNum', 'osId', 'diskSerialNum', 'nicMac']; + const appParams = ['biosSerialNum', 'osId', 'mainboardSerialNum', 'diskSerialNum', 'nicMac']; const requiredParams = 2; // } diff --git a/src/lib/licenseUtil.js b/src/lib/licenseUtil.js index 33ed26d..4247dc5 100644 --- a/src/lib/licenseUtil.js +++ b/src/lib/licenseUtil.js @@ -272,7 +272,9 @@ exports.check = async function (db, productId, systemParams, activationId, modul let activatedParamObj = {} for (elm of activatedParams) { - activatedParamObj[elm.paramId] = elm.paramValue; + if (elm.flag & 1) { + activatedParamObj[elm.paramId] = elm.paramValue; + } } return {