From 14443099e0377e8d9af52f53f15c2f8b91b784d2 Mon Sep 17 00:00:00 2001 From: zomars Date: Mon, 1 Aug 2022 17:59:47 -0600 Subject: [PATCH] successRedirectUrl fixes --- packages/prisma/zod-utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/prisma/zod-utils.ts b/packages/prisma/zod-utils.ts index edfe7f6142..a6f96fad1c 100644 --- a/packages/prisma/zod-utils.ts +++ b/packages/prisma/zod-utils.ts @@ -118,8 +118,7 @@ export const userMetadata = z * - XSS attempts through javascript:alert('hi') * - mailto: links */ -export function assertValidUrl(url: string | null | undefined) { - if (!url) return false; +export function assertValidUrl(url: string) { return url.startsWith("http://") && url.startsWith("https://"); }