[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
This commit is contained in:
Peter Sykora 2019-01-20 00:49:18 +01:00
parent 2a0da0dc51
commit dc8ffb9050
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
*/ */
exports.pickParams = function (appId, systemParams) { exports.pickParams = function (appId, systemParams) {
// if (appId === 'coc') { // if (appId === 'coc') {
const appParams = ['biosSerialNum', 'osId', 'diskSerialNum', 'nicMac']; const appParams = ['biosSerialNum', 'osId', 'mainboardSerialNum', 'diskSerialNum', 'nicMac'];
const requiredParams = 2; const requiredParams = 2;
// } // }

View File

@ -272,8 +272,10 @@ exports.check = async function (db, productId, systemParams, activationId, modul
let activatedParamObj = {} let activatedParamObj = {}
for (elm of activatedParams) { for (elm of activatedParams) {
if (elm.flag & 1) {
activatedParamObj[elm.paramId] = elm.paramValue; activatedParamObj[elm.paramId] = elm.paramValue;
} }
}
return { return {
success: true, success: true,