From dfaacac98ac59f2406f1e2231642f97c44332cc0 Mon Sep 17 00:00:00 2001 From: Dawid Sowa Date: Tue, 17 Sep 2024 16:10:51 +0200 Subject: [PATCH] fix: rola challenge validation case insensitive --- .../dapp-toolkit/src/helpers/validate-rola-challenge.spec.ts | 1 + packages/dapp-toolkit/src/helpers/validate-rola-challenge.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dapp-toolkit/src/helpers/validate-rola-challenge.spec.ts b/packages/dapp-toolkit/src/helpers/validate-rola-challenge.spec.ts index d21349a4..6883f28b 100644 --- a/packages/dapp-toolkit/src/helpers/validate-rola-challenge.spec.ts +++ b/packages/dapp-toolkit/src/helpers/validate-rola-challenge.spec.ts @@ -6,6 +6,7 @@ describe('validateRolaChallenge', () => { '3f30f8d67ca69af8b646170d6ddd0a16cb501dcb7d457d0b49ef78a5d1b4beac', '0a6a5b8beac0e56b8613f1b1a08223b3986aa28b9acc81d16493c75a428f436e', '2455077b5bb93e1d5c9816513c3385b88293d91b9d44ed6bd652764834eb997a', + '2455077b5BB93e1d5c9816513c3385b88293d91b9d44ed6BD652764834eb997a', ] const invalidTestVectors = [ diff --git a/packages/dapp-toolkit/src/helpers/validate-rola-challenge.ts b/packages/dapp-toolkit/src/helpers/validate-rola-challenge.ts index d1c70aae..cf57079b 100644 --- a/packages/dapp-toolkit/src/helpers/validate-rola-challenge.ts +++ b/packages/dapp-toolkit/src/helpers/validate-rola-challenge.ts @@ -1,2 +1,2 @@ export const validateRolaChallenge = (challenge?: unknown) => - typeof challenge === 'string' && /^[0-9a-f]{64}$/.test(challenge); \ No newline at end of file + typeof challenge === 'string' && /^[0-9a-f]{64}$/i.test(challenge); \ No newline at end of file