From 9231d2d9308163067b1ff321e61c7f0f80fadec7 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 31 Aug 2020 07:42:29 +0200 Subject: [PATCH] Make server verification case insensitive --- server/proofVerification.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/proofVerification.js b/server/proofVerification.js index 66fb4c9..ce3b520 100644 --- a/server/proofVerification.js +++ b/server/proofVerification.js @@ -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; } }