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); return re.test(data);
break; break;
case 'eq': case 'eq':
return data == checkClaim; return data.toLowerCase() == checkClaim.toLowerCase();
break; break;
case 'oneOf': case 'oneOf':
return data.includes(checkClaim); let re = new RegExp(checkClaim, "gi");
return re.test(data.join("|"));
break; break;
} }
} }