mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge pull request #4568 from JaysonHurst/fips
fix: Removed offending MD5 crypto hash and replaced with SHA1 and SHA256 …
This commit is contained in:
commit
6a0f45140c
@ -99,7 +99,7 @@ module.exports = {
|
|||||||
// settings.instanceId is set asynchronously to the editor-api
|
// settings.instanceId is set asynchronously to the editor-api
|
||||||
// being initiaised. So we defer calculating the cacheBuster hash
|
// being initiaised. So we defer calculating the cacheBuster hash
|
||||||
// until the first load of the editor
|
// until the first load of the editor
|
||||||
cacheBuster = crypto.createHash('md5').update(`${settings.version || 'version'}-${settings.instanceId || 'instanceId'}`).digest("hex").substring(0,12)
|
cacheBuster = crypto.createHash('sha1').update(`${settings.version || 'version'}-${settings.instanceId || 'instanceId'}`).digest("hex").substring(0,12)
|
||||||
}
|
}
|
||||||
|
|
||||||
let sessionMessages;
|
let sessionMessages;
|
||||||
|
@ -77,7 +77,7 @@ var storageModuleInterface = {
|
|||||||
flows: flows,
|
flows: flows,
|
||||||
credentials: creds
|
credentials: creds
|
||||||
};
|
};
|
||||||
result.rev = crypto.createHash('md5').update(JSON.stringify(result.flows)).digest("hex");
|
result.rev = crypto.createHash('sha256').update(JSON.stringify(result.flows)).digest("hex");
|
||||||
return result;
|
return result;
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@ -95,7 +95,7 @@ var storageModuleInterface = {
|
|||||||
|
|
||||||
return credentialSavePromise.then(function() {
|
return credentialSavePromise.then(function() {
|
||||||
return storageModule.saveFlows(flows, user).then(function() {
|
return storageModule.saveFlows(flows, user).then(function() {
|
||||||
return crypto.createHash('md5').update(JSON.stringify(config.flows)).digest("hex");
|
return crypto.createHash('sha256').update(JSON.stringify(config.flows)).digest("hex");
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user