fix: don't send the CAPTCHA token in the email message plain text through contact form
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m10s

This commit is contained in:
Dorian Niemiec 2024-11-07 21:44:11 +01:00
parent aa33e93ae9
commit 694e632815

View file

@ -13,7 +13,9 @@ const generateEmailContent = (data: Record<string, string>) => {
const stringData = Object.entries(data).reduce( const stringData = Object.entries(data).reduce(
(str, [key, val]) => (str, [key, val]) =>
str + str +
`${CONTACT_MESSAGE_FIELDS[key] || key}: ${val.replace(/\n/g, "\n")} \n\n`, (key == "captchaToken"
? ""
: `${CONTACT_MESSAGE_FIELDS[key] || key}: ${val.replace(/\n/g, "\n")} \n\n`),
"" ""
); );