Revert "fix: allow [homarr_base] template variables in app href validation (#6508)"
This reverts commit f1b7a5146a.
This commit is contained in:
2 files changed
-5
No files matched your search
@@ -119,7 +119,6 @@ export type HomarrDocumentationPath =
|
|||||||
| "/docs/tags/variables"
|
| "/docs/tags/variables"
|
||||||
| "/docs/tags/widgets"
|
| "/docs/tags/widgets"
|
||||||
| "/docs/advanced/command-line"
|
| "/docs/advanced/command-line"
|
||||||
| "/docs/advanced/command-line/development"
|
|
||||||
| "/docs/advanced/command-line/fix-usernames"
|
| "/docs/advanced/command-line/fix-usernames"
|
||||||
| "/docs/advanced/command-line/integrations"
|
| "/docs/advanced/command-line/integrations"
|
||||||
| "/docs/advanced/command-line/password-recovery"
|
| "/docs/advanced/command-line/password-recovery"
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ export const appHrefSchema = z
|
|||||||
.trim()
|
.trim()
|
||||||
.url()
|
.url()
|
||||||
.regex(/^(?!javascript)[a-zA-Z]*:\/\//i) // javascript: is not allowed, i for case insensitive (so Javascript: is also not allowed)
|
.regex(/^(?!javascript)[a-zA-Z]*:\/\//i) // javascript: is not allowed, i for case insensitive (so Javascript: is also not allowed)
|
||||||
.or(z.string().trim().includes("[homarr_base]"))
|
|
||||||
.or(z.string().trim().includes("[homarr_hostname]"))
|
|
||||||
.or(z.string().trim().includes("[homarr_domain]"))
|
|
||||||
.or(z.string().trim().includes("[homarr_protocol]"))
|
|
||||||
.or(z.literal(""))
|
.or(z.literal(""))
|
||||||
.transform((value) => (value.length === 0 ? null : value))
|
.transform((value) => (value.length === 0 ? null : value))
|
||||||
.nullable();
|
.nullable();
|
||||||
|
|||||||
Reference in new issue
Block a user