From 28742ede997f7a8a3561ea23d883969de779ac1b Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 10 Sep 2020 23:43:51 +0200 Subject: [PATCH] Remove newlines before checking equality --- server/proofVerification.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/proofVerification.js b/server/proofVerification.js index dc7556d..b99ad9f 100644 --- a/server/proofVerification.js +++ b/server/proofVerification.js @@ -106,7 +106,7 @@ const VerifyJsonProof = (data, checkPath, checkClaim, checkRelation) => { return re.test(data); break; case 'eq': - return data.toLowerCase() == checkClaim.toLowerCase(); + return data.replace(/\r?\n|\r/, '').toLowerCase() == checkClaim.toLowerCase(); break; case 'oneOf': re = new RegExp(checkClaim, "gi");