From 677b679c2cd66e4f2e7d0f0eacce7167e710ac97 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 15 Jan 2024 16:47:57 -0600 Subject: [PATCH] NIP-57: build lnurl in more secure way --- nip57.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nip57.ts b/nip57.ts index b8c9a2e..a95a52d 100644 --- a/nip57.ts +++ b/nip57.ts @@ -23,7 +23,7 @@ export async function getZapEndpoint(metadata: Event): Promise { lnurl = utf8Decoder.decode(data) } else if (lud16) { let [name, domain] = lud16.split('@') - lnurl = `https://${domain}/.well-known/lnurlp/${name}` + lnurl = new URL(`/.well-known/lnurlp/${name}`, `https://${domain}`).toString() } else { return null }