From 6337cf4359970de3bfd79f941b987144a94d48e2 Mon Sep 17 00:00:00 2001 From: Owen Date: Wed, 20 May 2026 16:14:47 -0700 Subject: [PATCH] Fix #3104 --- server/lib/blueprints/types.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/lib/blueprints/types.ts b/server/lib/blueprints/types.ts index 13f4caa8f..221b5e586 100644 --- a/server/lib/blueprints/types.ts +++ b/server/lib/blueprints/types.ts @@ -82,7 +82,7 @@ export const RuleSchema = z .object({ action: z.enum(["allow", "deny", "pass"]), match: z.enum(["cidr", "path", "ip", "country", "asn", "region"]), - value: z.string(), + value: z.coerce.string(), priority: z.int().optional() }) .refine( @@ -340,7 +340,8 @@ export const ResourceSchema = z if (parts.includes("*", 1)) return false; // no further wildcards if (parts.length < 3) return false; // need at least *.label.tld - const labelRegex = /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$|^[a-zA-Z0-9]$/; + const labelRegex = + /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$|^[a-zA-Z0-9]$/; return parts.slice(1).every((label) => labelRegex.test(label)); }, {