diff --git a/app/[locale]/products/[...slug]/page.tsx b/app/[locale]/products/[...slug]/page.tsx index 94f7964f..d58e4892 100644 --- a/app/[locale]/products/[...slug]/page.tsx +++ b/app/[locale]/products/[...slug]/page.tsx @@ -499,9 +499,14 @@ export default async function ProductPage({ params }: ProductPageProps) {
-
- - {excelPath && } +
+ + {excelPath && ( + + )}
)} diff --git a/app/actions/brochure.ts b/app/actions/brochure.ts index c5397624..a8a25a8a 100644 --- a/app/actions/brochure.ts +++ b/app/actions/brochure.ts @@ -23,6 +23,14 @@ export async function requestBrochureAction(formData: FormData) { const email = formData.get('email') as string; const locale = (formData.get('locale') as string) || 'en'; + // Anti-spam Honeypot Check + const honeypot = formData.get('company_website') as string; + if (honeypot) { + logger.warn('Spam detected via honeypot in brochure request', { email }); + // Silently succeed to fool the bot without doing actual work + return { success: true }; + } + if (!email) { logger.warn('Missing email in brochure request'); return { success: false, error: 'Missing email address' }; @@ -77,7 +85,7 @@ export async function requestBrochureAction(formData: FormData) { const html = await render( React.createElement(BrochureDeliveryEmail, { - email, + _email: email, brochureUrl, locale: locale as 'en' | 'de', }), diff --git a/app/actions/contact.ts b/app/actions/contact.ts index f1ee3c57..2e692761 100644 --- a/app/actions/contact.ts +++ b/app/actions/contact.ts @@ -25,6 +25,14 @@ export async function sendContactFormAction(formData: FormData) { // Track attempt services.analytics.track('contact-form-attempt'); + // Anti-spam Honeypot Check + const honeypot = formData.get('company_website') as string; + if (honeypot) { + logger.warn('Spam detected via honeypot in contact request', { email: formData.get('email') }); + // Silently succeed to fool the bot without doing actual work + return { success: true }; + } + const name = formData.get('name') as string; const email = formData.get('email') as string; const message = formData.get('message') as string; diff --git a/components/ContactForm.tsx b/components/ContactForm.tsx index 47116404..87c44bdf 100644 --- a/components/ContactForm.tsx +++ b/components/ContactForm.tsx @@ -139,6 +139,15 @@ export default function ContactForm() { {t('form.title')}
+ {/* Anti-spam Honeypot */} +
+ {/* Anti-spam Honeypot */} + +
+ {/* Anti-spam Honeypot */} + +