From a3fef55be4b9f90dd6d34cdc011af4365dff4106 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 4 Feb 2022 21:29:37 +0100 Subject: [PATCH] not comparing if hash is not 64 in length --- backend/api/controllers/result.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/api/controllers/result.js b/backend/api/controllers/result.js index 2e3afa7ec..15ffd9402 100644 --- a/backend/api/controllers/result.js +++ b/backend/api/controllers/result.js @@ -100,7 +100,11 @@ class ResultController { let resulthash = result.hash; delete result.hash; - if (req.ctx.configuration.resultObjectHashCheck.enabled) { + if ( + req.ctx.configuration.resultObjectHashCheck.enabled && + resulthash.length === 64 + ) { + //if its not 64 that means client is still using old hashing package const serverhash = objecthash(result); if (serverhash !== resulthash) { Logger.log(