Skip to content

Commit 092a893

Browse files
committed
do not render hidden CSRF token forms with autocomplete set to off
1 parent 264cff3 commit 092a893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Extension/Csrf/Type/FormTypeCsrfExtension.php

+1-1
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)