not comparing if hash is not 64 in length

This commit is contained in:
Miodec 2022-02-04 21:29:37 +01:00
parent 957b4cf1a8
commit a3fef55be4

View file

@ -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(