fix(security): restrict link protocols to http and https (#1888)

This commit is contained in:
Meier Lukas
2025-01-10 14:45:30 +01:00
committed by GitHub
parent 80c02ef9f2
commit a12dd10269
5 changed files with 41 additions and 4 deletions

View File

@@ -7,7 +7,10 @@ import { createSavePermissionsSchema } from "./permissions";
const integrationCreateSchema = z.object({
name: z.string().nonempty().max(127),
url: z.string().url(),
url: z
.string()
.url()
.regex(/^https?:\/\//), // Only allow http and https for security reasons (javascript: is not allowed)
kind: zodEnumFromArray(integrationKinds),
secrets: z.array(
z.object({