From 3ea2be5a434d185ebc2642e1e7f020deed0229ab Mon Sep 17 00:00:00 2001 From: help4bis Date: Fri, 23 Oct 2026 06:41:43 +1000 Subject: [PATCH] fix: pricing paths, contact form spam guard, tracker on all pages, drop unused CDN script (cockpit #163 #164 #171) Co-Authored-By: Claude Sonnet 5.5 --- site/ai-integration.html | 1 - site/assets/js/main.js | 4 ++ site/care-plans.html | 1 - site/contact.html | 5 +- site/contact.php | 10 ++++ site/garden-data-mcp.html | 1 + site/managed-wordpress.html | 1 - site/plugin-development.html | 1 - site/pricing.html | 89 +++++++++++++++++----------------- site/privacy.html | 1 - site/sos-fix.html | 5 +- site/terms.html | 1 - site/work/crohamhurst-app.html | 1 + site/work/localbuddy-au.html | 1 + site/work/m8chat-au.html | 1 + site/work/nightcap-nm.html | 1 + site/work/rds-ink.html | 1 + 17 files changed, 72 insertions(+), 53 deletions(-) diff --git a/site/ai-integration.html b/site/ai-integration.html index c938a43..f2eaaf0 100644 --- a/site/ai-integration.html +++ b/site/ai-integration.html @@ -44,7 +44,6 @@ - diff --git a/site/assets/js/main.js b/site/assets/js/main.js index b32a565..9da1edd 100644 --- a/site/assets/js/main.js +++ b/site/assets/js/main.js @@ -151,6 +151,8 @@ function initAnchorScroll() { /* ══════════════════════════════════════ FORM HANDLER ══════════════════════════════════════ */ +const formShownAt = Date.now(); + function initForms() { document.querySelectorAll('.intake-form').forEach(form => { form.addEventListener('submit', async (e) => { @@ -163,6 +165,8 @@ function initForms() { // Collect all named fields const data = {}; new FormData(form).forEach((val, key) => { data[key] = val; }); + // Spam check: how long the visitor took to fill the form (measured on their own clock) + data.fill_ms = Date.now() - formShownAt; try { const res = await fetch('/contact.php', { diff --git a/site/care-plans.html b/site/care-plans.html index 5e57010..e37f7b1 100644 --- a/site/care-plans.html +++ b/site/care-plans.html @@ -44,7 +44,6 @@ - diff --git a/site/contact.html b/site/contact.html index 75b9eb7..8408943 100644 --- a/site/contact.html +++ b/site/contact.html @@ -44,7 +44,6 @@ - @@ -165,6 +164,10 @@
+
diff --git a/site/contact.php b/site/contact.php index 568a87f..36435eb 100644 --- a/site/contact.php +++ b/site/contact.php @@ -35,6 +35,16 @@ if (!$data) { $data = $_POST; } +// Spam check (cockpit #164). Bots fill the hidden hp_trap field or post straight to this +// handler without the fill time the page script adds, or submit faster than a person can type. +// Answer ok so the bot learns nothing, send nothing, and leave one log line to measure with. +$fillMs = $data['fill_ms'] ?? null; +if (!empty($data['hp_trap']) || !is_numeric($fillMs) || (float)$fillMs < 3000) { + error_log('HELP4BIS contact form: spam dropped (' . (!empty($data['hp_trap']) ? 'honeypot' : (!is_numeric($fillMs) ? 'no fill time' : 'too fast')) . ')'); + echo json_encode(['ok' => true]); + exit; +} + // Sanitise and validate required fields $name = trim(strip_tags($data['name'] ?? '')); $email = trim(strip_tags($data['email'] ?? '')); diff --git a/site/garden-data-mcp.html b/site/garden-data-mcp.html index 208cce5..0ade575 100644 --- a/site/garden-data-mcp.html +++ b/site/garden-data-mcp.html @@ -327,5 +327,6 @@ POST https://mcp.help4bis.com/mcp + diff --git a/site/managed-wordpress.html b/site/managed-wordpress.html index 717d450..a5b9577 100644 --- a/site/managed-wordpress.html +++ b/site/managed-wordpress.html @@ -44,7 +44,6 @@ - diff --git a/site/plugin-development.html b/site/plugin-development.html index d8f33c9..b0fcd96 100644 --- a/site/plugin-development.html +++ b/site/plugin-development.html @@ -44,7 +44,6 @@ - diff --git a/site/pricing.html b/site/pricing.html index 380ba7e..bca8e95 100644 --- a/site/pricing.html +++ b/site/pricing.html @@ -40,13 +40,12 @@ - + - - + + diff --git a/site/privacy.html b/site/privacy.html index dbddea5..f55b29c 100644 --- a/site/privacy.html +++ b/site/privacy.html @@ -36,7 +36,6 @@ - diff --git a/site/sos-fix.html b/site/sos-fix.html index fb22cad..822612c 100644 --- a/site/sos-fix.html +++ b/site/sos-fix.html @@ -44,7 +44,6 @@ - @@ -310,6 +309,10 @@
+
diff --git a/site/terms.html b/site/terms.html index c13db25..397b241 100644 --- a/site/terms.html +++ b/site/terms.html @@ -35,7 +35,6 @@ - diff --git a/site/work/crohamhurst-app.html b/site/work/crohamhurst-app.html index 322a922..910f4dd 100644 --- a/site/work/crohamhurst-app.html +++ b/site/work/crohamhurst-app.html @@ -536,5 +536,6 @@ + diff --git a/site/work/localbuddy-au.html b/site/work/localbuddy-au.html index 7897e53..86c9f3a 100644 --- a/site/work/localbuddy-au.html +++ b/site/work/localbuddy-au.html @@ -514,5 +514,6 @@ + diff --git a/site/work/m8chat-au.html b/site/work/m8chat-au.html index c563d6f..4b3afcd 100644 --- a/site/work/m8chat-au.html +++ b/site/work/m8chat-au.html @@ -513,5 +513,6 @@ + diff --git a/site/work/nightcap-nm.html b/site/work/nightcap-nm.html index c2a0ce2..f23ddde 100644 --- a/site/work/nightcap-nm.html +++ b/site/work/nightcap-nm.html @@ -446,5 +446,6 @@ + diff --git a/site/work/rds-ink.html b/site/work/rds-ink.html index 3e373fe..56ee45c 100644 --- a/site/work/rds-ink.html +++ b/site/work/rds-ink.html @@ -586,5 +586,6 @@ +