Skip to content

Commit f6dcd9f

Browse files
bug symfony#59296 [Form] do not render hidden CSRF token forms with autocomplete set to off (xabbuh)
This PR was merged into the 7.2 branch. Discussion ---------- [Form] do not render hidden CSRF token forms with autocomplete set to off | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#59294 | License | MIT Commits ------- dcf17e6 do not render hidden CSRF token forms with autocomplete set to off
2 parents e363f16 + dcf17e6 commit f6dcd9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Form/Extension/Csrf/Type/FormTypeCsrfExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function finishView(FormView $view, FormInterface $form, array $options):
7676
$csrfForm = $factory->createNamed($options['csrf_field_name'], HiddenType::class, $data, [
7777
'block_prefix' => 'csrf_token',
7878
'mapped' => false,
79-
'attr' => $this->fieldAttr + ['autocomplete' => 'off'],
79+
'attr' => $this->fieldAttr,
8080
]);
8181

8282
$view->children[$options['csrf_field_name']] = $csrfForm->createView($view);

0 commit comments

Comments
 (0)