From a8bf141ed7e085d90377c1ebe67eee91a69b1915 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 25 Mar 2022 20:45:16 +0100 Subject: [PATCH] checking if resulthash length is 40 --- backend/api/controllers/result.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/api/controllers/result.ts b/backend/api/controllers/result.ts index 27e31e063..9090707e8 100644 --- a/backend/api/controllers/result.ts +++ b/backend/api/controllers/result.ts @@ -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) {