This commit is contained in:
Peter
2025-06-17 18:51:06 +01:00
parent 7e69cd0c19
commit 623b29dea4
4 changed files with 59 additions and 73 deletions

View File

@@ -876,6 +876,15 @@ $twitter_card_image = "https://ukdataservices.co.uk/assets/images/ukds-main-logo
<div class="contact-form">
<form action="contact-handler.php" method="POST" class="form">
<?php
session_start();
if (!isset($_SESSION['csrf_token'])) {
$_SESSION['csrf_token'] = bin2hex(random_bytes(32));
}
?>
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($_SESSION['csrf_token']); ?>">
<!-- Honeypot field for spam protection -->
<input type="text" name="website" style="display: none !important; position: absolute !important; left: -9999px !important;" tabindex="-1" autocomplete="off">
<div class="form-group">
<label for="name">Contact Name *</label>
<input type="text" id="name" name="name" required>