Merge branch 'release/2020.10-05'
This commit is contained in:
Generated
+13
-12
@@ -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",
|
||||
|
||||
@@ -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'],
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
pageUid="{settings.defaultAjaxUid}"
|
||||
additionalAttributes="{'v-show': '!success', '@submit.prevent': 'submitForm()'}">
|
||||
<f:form.hidden property="pageUrl"/>
|
||||
<label class="block mb-4 hidden">
|
||||
<span class="text-gray-700">Betreff*</span>
|
||||
<f:form.textfield class="form-input mt-1 block w-full" property="subject"/>
|
||||
</label>
|
||||
<label class="block mb-4" :class="{ 'has-validation-error': formErrors.name }">
|
||||
<span :class="formErrors.name ? 'text-red-500' : 'text-gray-700'">Name*</span>
|
||||
<f:form.textfield class="form-input mt-1 block w-full" property="name"/>
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
pageUid="{settings.defaultAjaxUid}"
|
||||
additionalAttributes="{'v-show': '!success', '@submit.prevent': 'submitForm()'}">
|
||||
<f:form.hidden property="pageUrl"/>
|
||||
<label class="block mb-4 hidden">
|
||||
<span class="text-gray-700">Betreff*</span>
|
||||
<f:form.textfield class="form-input mt-1 block w-full" property="subject"/>
|
||||
</label>
|
||||
<label class="block mb-4" :class="{ 'has-validation-error': formErrors.gender }">
|
||||
<span :class="formErrors.gender ? 'text-red-500' : 'text-gray-700'">Gender*</span>
|
||||
<f:form.select class="form-select mt-1 block w-full" property="gender" options="{m: 'M', w: 'W', d: 'D'}"/>
|
||||
|
||||
Reference in New Issue
Block a user