feat(apps): allow custom URI schemes in application links (#6521)

This commit is contained in:
Thomas authored and GitHub committed 2026-08-06 21:52:56 +02:00
1 parent 637f03e107
commit f76a0f240a
3 files changed
+9 -7

No files matched your search

+1 -2
View File
@@ -3,8 +3,7 @@ import { z } from "zod/v4";
export const appHrefSchema = z
.string()
.trim()
.url()
.regex(/^(?!javascript)[a-zA-Z]*:\/\//i) // javascript: is not allowed, i for case insensitive (so Javascript: is also not allowed)
.refine((val) => !/^javascript:/i.test(val), "JavaScript URIs are not permitted")
.or(z.literal(""))
.transform((value) => (value.length === 0 ? null : value))
.nullable();