Make server verification case insensitive

This commit is contained in:
Yarmo Mackenbach 2020-08-31 07:42:29 +02:00
parent 7d1482aa51
commit 9231d2d930

View file

@ -105,10 +105,11 @@ const VerifyJsonProof = (data, checkPath, checkClaim, checkRelation) => {
return re.test(data);
break;
case 'eq':
return data == checkClaim;
return data.toLowerCase() == checkClaim.toLowerCase();
break;
case 'oneOf':
return data.includes(checkClaim);
let re = new RegExp(checkClaim, "gi");
return re.test(data.join("|"));
break;
}
}