checking if resulthash length is 40

This commit is contained in:
Miodec 2022-03-25 20:45:16 +01:00
parent 669032e66e
commit a8bf141ed7

View file

@ -78,7 +78,10 @@ class ResultController {
const resulthash = result.hash;
delete result.hash;
delete result.stringified;
if (req.ctx.configuration.resultObjectHashCheck.enabled) {
if (
req.ctx.configuration.resultObjectHashCheck.enabled &&
resulthash.length === 40
) {
//if its not 64 that means client is still using old hashing package
const serverhash = objectHash(result);
if (serverhash !== resulthash) {