nip05 regex name check.

This commit is contained in:
fiatjaf
2022-12-23 15:04:24 -03:00
parent c08bdac7a7
commit f7e510e1c8

View File

@@ -36,6 +36,8 @@ export async function queryProfile(
name = '_'
}
if (!name.match(/^[a-z0-9-_]+$/)) return null
let res = await (
await _fetch(`https://${domain}/.well-known/nostr.json?name=${name}`)
).json()