From 08f529fc0d1f812c420f91b6d67b226ec7cb2e95 Mon Sep 17 00:00:00 2001 From: nico Date: Thu, 5 Nov 2026 10:31:30 +0000 Subject: [PATCH] fix(settings): validate e-invoice toggle value --- backend/src/routes/tenant.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/src/routes/tenant.ts b/backend/src/routes/tenant.ts index f2c363dc..15a2d295 100644 --- a/backend/src/routes/tenant.ts +++ b/backend/src/routes/tenant.ts @@ -278,6 +278,11 @@ export default async function tenantRoutes(server: FastifyInstance) { if (!data) return reply.code(400).send({ error: "data required" }) + if (data.businessInfo && Object.prototype.hasOwnProperty.call(data.businessInfo, "outgoingEInvoiceEnabled") + && typeof data.businessInfo.outgoingEInvoiceEnabled !== "boolean") { + return reply.code(400).send({ error: "Die Einstellung für Ausgangs-E-Rechnungen muss ein Wahrheitswert sein." }) + } + if (Object.prototype.hasOwnProperty.call(data, "portalConfig")) { const config = data.portalConfig if (!config || typeof config !== "object" || Array.isArray(config)