Fix consultation form reCAPTCHA integration and validation

- Add missing recaptcha_response hidden field to quote form
- Implement reCAPTCHA validation in quote-handler.php
- Add proper error handling for security verification failures
- Form submissions now properly validate reCAPTCHA tokens before processing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-08-09 06:12:52 +00:00
parent 4ab3d2d2a8
commit f9312acb47
2 changed files with 56 additions and 0 deletions

View File

@@ -503,6 +503,8 @@ $canonical_url = "https://ukdataservices.co.uk/quote";
$_SESSION['form_start_time'] = time();
?>
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($_SESSION['csrf_token']); ?>">
<!-- reCAPTCHA response field -->
<input type="hidden" name="recaptcha_response" id="recaptchaResponseQuote" value="">
<!-- Honeypot field for spam protection -->
<input type="text" name="website" style="display: none !important; position: absolute !important; left: -9999px !important;" tabindex="-1" autocomplete="off">
<!-- Step 1: Project Type -->