From 4e8fe767124439d93e2c2f13337cc922b704043d Mon Sep 17 00:00:00 2001 From: Bogdan Chadkin Date: Sun, 28 Jul 2024 18:41:02 +0200 Subject: [PATCH] Prevent sending files in emails --- packages/form-handlers/src/shared.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/form-handlers/src/shared.ts b/packages/form-handlers/src/shared.ts index 24560ee6ad1f..8520a9c562e6 100644 --- a/packages/form-handlers/src/shared.ts +++ b/packages/form-handlers/src/shared.ts @@ -43,6 +43,9 @@ export const formToEmail = ({ html += ""; for (const [key, value] of formData) { + if (typeof value !== "string") { + continue; + } html += ``; txt += `${key}: ${value}\n`; }
${key}:${value}