successRedirectUrl fixes

pull/3676/head
zomars 2022-08-01 17:59:47 -06:00
parent 3ae4655449
commit 14443099e0
1 changed files with 1 additions and 2 deletions

View File

@ -118,8 +118,7 @@ export const userMetadata = z
* - XSS attempts through javascript:alert('hi') * - XSS attempts through javascript:alert('hi')
* - mailto: links * - mailto: links
*/ */
export function assertValidUrl(url: string | null | undefined) { export function assertValidUrl(url: string) {
if (!url) return false;
return url.startsWith("http://") && url.startsWith("https://"); return url.startsWith("http://") && url.startsWith("https://");
} }