feat: captcha protection for ep-events
This commit is contained in:
@@ -136,8 +136,7 @@ class AjaxFormController extends ActionController implements LoggerAwareInterfac
|
||||
];
|
||||
|
||||
if ($this->arguments->validate()->hasErrors()) {
|
||||
foreach ($this->arguments->validate()->getFlattenedErrors() as $key => $errors)
|
||||
{
|
||||
foreach ($this->arguments->validate()->getFlattenedErrors() as $key => $errors) {
|
||||
$key = str_replace('.', '', $key);
|
||||
$errorsRaw = [];
|
||||
foreach ($errors as $error)
|
||||
|
||||
@@ -33,6 +33,13 @@ class Inquiry extends AbstractValueObject
|
||||
{
|
||||
public const TOKEN_KEY = 'inquiry_form';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("SJBR\SrFreecap\Validation\Validator\CaptchaValidator")
|
||||
*/
|
||||
protected $captchaResponse;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
@@ -226,6 +233,22 @@ class Inquiry extends AbstractValueObject
|
||||
$this->token = $token;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCaptchaResponse()
|
||||
{
|
||||
return $this->captchaResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $captchaResponse
|
||||
*/
|
||||
public function setCaptchaResponse(string $captchaResponse)
|
||||
{
|
||||
$this->captchaResponse = $captchaResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user