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
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m10s
This commit is contained in:
parent
aa33e93ae9
commit
694e632815
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,9 @@ const generateEmailContent = (data: Record<string, string>) => {
|
|||
const stringData = Object.entries(data).reduce(
|
||||
(str, [key, val]) =>
|
||||
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`),
|
||||
""
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue