From a280ec029f93000a4c7297e32c8578f08a9d34e5 Mon Sep 17 00:00:00 2001
From: Serios <seriosbg@gmail.com>
Date: Mon, 16 Dec 2019 15:29:41 +0200
Subject: [PATCH] Fixing an issue that with contact form sending unnecessary
 additional data

There is an option that dev can add additional fields to contact form, that are sent back. But GDPR field is send back too, also if using NoCaptcha ReCaptcha plugin, response token from Google is send back too.
---
 contact.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contact.php b/contact.php
index 24525a84f..f3cdabc74 100644
--- a/contact.php
+++ b/contact.php
@@ -191,7 +191,7 @@ if(isset($_POST['send-contactus']))
 
 		$CONTACT_EMAIL = e107::getCoreTemplate('contact','email');
 
-		unset($_POST['contact_person'], $_POST['author_name'], $_POST['email_send'] , $_POST['subject'], $_POST['body'], $_POST['rand_num'], $_POST['code_verify'], $_POST['send-contactus']);
+		unset($_POST['contact_person'], $_POST['author_name'], $_POST['email_send'] , $_POST['subject'], $_POST['body'], $_POST['rand_num'], $_POST['code_verify'], $_POST['send-contactus'], $_POST['g-recaptcha-response'],  $_POST['gdpr']);
 
 		if(!empty($_POST)) // support for custom fields in contact template.
 		{
@@ -293,4 +293,4 @@ elseif($active == e_UC_MEMBER && ($pref['sitecontacts'] != e_UC_NOBODY))
 
 require_once(FOOTERF);
 exit;
-?>
\ No newline at end of file
+?>