From cf766cd835bf0b254a7ac42bf5d0533194e866fb Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 12 Feb 2024 07:41:44 -0300 Subject: [PATCH] nip05: fix regex group 2 matching. --- nip05.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nip05.ts b/nip05.ts index b2155b5..b0547f6 100644 --- a/nip05.ts +++ b/nip05.ts @@ -7,7 +7,7 @@ import { ProfilePointer } from './nip19.ts' * - 1: name (optional) * - 2: domain */ -export const NIP05_REGEX = /^(?:([\w.+-]+)@)?[\w_-]+(\.[\w_-]+)+$/ +export const NIP05_REGEX = /^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/ var _fetch: any