diff --git a/composer.lock b/composer.lock
index c14cbde7..6add609c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1592,20 +1592,20 @@
},
{
"name": "paragonie/random_compat",
- "version": "v9.99.99",
+ "version": "v9.99.100",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
- "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a",
+ "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a",
"shasum": ""
},
"require": {
- "php": "^7"
+ "php": ">= 7"
},
"require-dev": {
"phpunit/phpunit": "4.*|5.*",
@@ -1633,7 +1633,7 @@
"pseudorandom",
"random"
],
- "time": "2018-07-02T15:55:56+00:00"
+ "time": "2020-10-15T08:29:30+00:00"
},
{
"name": "pixelant/pxa-social-feed",
@@ -2804,16 +2804,16 @@
},
{
"name": "symfony/http-client-contracts",
- "version": "v2.2.0",
+ "version": "v2.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client-contracts.git",
- "reference": "3a5d0fe7908daaa23e3dbf4cee3ba4bfbb19fdd3"
+ "reference": "41db680a15018f9c1d4b23516059633ce280ca33"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/3a5d0fe7908daaa23e3dbf4cee3ba4bfbb19fdd3",
- "reference": "3a5d0fe7908daaa23e3dbf4cee3ba4bfbb19fdd3",
+ "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/41db680a15018f9c1d4b23516059633ce280ca33",
+ "reference": "41db680a15018f9c1d4b23516059633ce280ca33",
"shasum": ""
},
"require": {
@@ -2824,8 +2824,9 @@
},
"type": "library",
"extra": {
+ "branch-version": "2.3",
"branch-alias": {
- "dev-master": "2.2-dev"
+ "dev-main": "2.3-dev"
},
"thanks": {
"name": "symfony/contracts",
@@ -2875,7 +2876,7 @@
"type": "tidelift"
}
],
- "time": "2020-09-07T11:33:47+00:00"
+ "time": "2020-10-14T17:08:19+00:00"
},
{
"name": "symfony/http-foundation",
diff --git a/public/typo3conf/ext/ep_theme/Classes/Controller/AjaxFormController.php b/public/typo3conf/ext/ep_theme/Classes/Controller/AjaxFormController.php
index dda85a56..0f41b0f1 100644
--- a/public/typo3conf/ext/ep_theme/Classes/Controller/AjaxFormController.php
+++ b/public/typo3conf/ext/ep_theme/Classes/Controller/AjaxFormController.php
@@ -64,6 +64,13 @@ class AjaxFormController extends ActionController
public function processFormAction(ContactForm $contactForm)
{
$response['status'] = 'ok';
+
+ // Don't take further actions in case honeypot field is filled in
+ // as a spam countermeasure
+ if ($contactForm->getSubject()) {
+ return json_encode($response);
+ }
+
$this->emailService->send(
$this->settings['contactFormToEmail'],
$this->settings['contactFormToName'],
diff --git a/public/typo3conf/ext/ep_theme/Classes/Domain/Model/Dto/ContactForm.php b/public/typo3conf/ext/ep_theme/Classes/Domain/Model/Dto/ContactForm.php
index 3c046ddb..59595735 100644
--- a/public/typo3conf/ext/ep_theme/Classes/Domain/Model/Dto/ContactForm.php
+++ b/public/typo3conf/ext/ep_theme/Classes/Domain/Model/Dto/ContactForm.php
@@ -36,6 +36,13 @@ class ContactForm
*/
protected $formType = 1;
+ /**
+ * Honeypot field!!
+ *
+ * @var string
+ */
+ protected $subject;
+
/**
* @var string
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
@@ -117,6 +124,22 @@ class ContactForm
$this->formType = $formType;
}
+ /**
+ * @return string
+ */
+ public function getSubject()
+ {
+ return $this->subject;
+ }
+
+ /**
+ * @param string $subject
+ */
+ public function setSubject($subject)
+ {
+ $this->subject = $subject;
+ }
+
/**
* @return string
*/
diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html
index f4f95bac..50586560 100644
--- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html
+++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Form/FullForm.html
@@ -12,6 +12,10 @@
pageUid="{settings.defaultAjaxUid}"
additionalAttributes="{'v-show': '!success', '@submit.prevent': 'submitForm()'}">
+