diff --git a/package.json b/package.json index 1a1220b..e99f51d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ava", - "version": "2.0.1", + "version": "2.0.2", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/routes/webhooks/+page.server.ts b/src/routes/webhooks/+page.server.ts index 9fa2b9f..ea53064 100644 --- a/src/routes/webhooks/+page.server.ts +++ b/src/routes/webhooks/+page.server.ts @@ -30,8 +30,12 @@ export const actions = { if (!url || url instanceof File) return fail(400, { error: "no url supplied" }) - if (url.match(URL_REGEX)?.[0] !== url) + + try { + new URL(url) + } catch { return fail(400, { error: "bad url" }) + } url = new URL(url).toString()