fix merge
This commit is contained in:
parent
f8209784ee
commit
02adcc33a2
@ -66,8 +66,10 @@ class CsrfValidationListener implements EventSubscriberInterface
|
||||
if ($form->isRoot() && $form->getConfig()->getOption('compound') && !$postRequestSizeExceeded) {
|
||||
$data = $event->getData();
|
||||
|
||||
$csrfToken = new CsrfToken($this->tokenId, $data[$this->fieldName] ?? null);
|
||||
if (!isset($data[$this->fieldName]) || !\is_string($data[$this->fieldName]) || !$this->tokenManager->isTokenValid($csrfToken)) {
|
||||
$csrfValue = \is_string($data[$this->fieldName] ?? null) ? $data[$this->fieldName] : null;
|
||||
$csrfToken = new CsrfToken($this->tokenId, $csrfValue);
|
||||
|
||||
if (null === $csrfValue || !$this->tokenManager->isTokenValid($csrfToken)) {
|
||||
$errorMessage = $this->errorMessage;
|
||||
|
||||
if (null !== $this->translator) {
|
||||
|
Reference in New Issue
Block a user