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')
* - 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://");
}