From 04252aaaecdec512905e123e8a9e0d97f43e69dd Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 11 Feb 2024 07:48:13 -0300 Subject: [PATCH] nip05: improve regex. --- nip05.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nip05.ts b/nip05.ts index 7a7b76e..6bd1cc5 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.-]+)$/ +export const NIP05_REGEX = /^(?:([\w.+-]+)@)?[\w_-]+(\.[\w_-]+)+$/ var _fetch: any