From 61396625f151b6c00b8026d17603a7b739786145 Mon Sep 17 00:00:00 2001 From: DerPenz Date: Fri, 10 Apr 2026 14:33:22 +0200 Subject: [PATCH] fix(backup): added limits in zod schema --- app/server/modules/backups/backups.dto.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/server/modules/backups/backups.dto.ts b/app/server/modules/backups/backups.dto.ts index eb7b6bb0..6e68aed5 100644 --- a/app/server/modules/backups/backups.dto.ts +++ b/app/server/modules/backups/backups.dto.ts @@ -130,8 +130,8 @@ export const createBackupScheduleBody = z.object({ oneFileSystem: z.boolean().optional(), tags: z.array(z.string()).optional(), customResticParams: z.array(z.string()).optional(), - maxRetries: z.number().optional(), - retryDelay: z.number().optional(), + maxRetries: z.number().min(0).max(32).optional(), + retryDelay: z.number().min(1).max(1440).optional(), }); export type CreateBackupScheduleBody = z.infer; @@ -169,8 +169,8 @@ export const updateBackupScheduleBody = z.object({ oneFileSystem: z.boolean().optional(), tags: z.array(z.string()).optional(), customResticParams: z.array(z.string()).optional(), - maxRetries: z.number().optional(), - retryDelay: z.number().optional(), + maxRetries: z.number().min(0).max(32).optional(), + retryDelay: z.number().min(1).max(1440).optional(), }); export type UpdateBackupScheduleBody = z.infer;