Skip to content

Commit

Permalink
Do not customize CSRF token ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Nikolaev committed Aug 5, 2020
1 parent 47ed002 commit d0eb8db
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 32 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ darvin_user:
- Use UserInterface instead of AdvancedUserInterface.
6.2.0: Reorganize email sending functionality.
6.2.11: Do not customize CSRF token ID.
9 changes: 0 additions & 9 deletions Form/Type/PasswordResetToken/RequestType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\NotBlank;

Expand Down Expand Up @@ -57,14 +56,6 @@ public function finishView(FormView $view, FormInterface $form, array $options):
}
}

/**
* {@inheritDoc}
*/
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefault('csrf_token_id', md5(__FILE__.$this->getBlockPrefix()));
}

/**
* {@inheritDoc}
*/
Expand Down
9 changes: 3 additions & 6 deletions Form/Type/Profile/PasswordChangeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ public function finishView(FormView $view, FormInterface $form, array $options):
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
'csrf_token_id' => md5(__FILE__.$this->getBlockPrefix()),
'validation_groups' => [
'Default',
'PasswordChange',
],
->setDefault('validation_groups', [
'Default',
'PasswordChange',
])
->remove('data_class')
->setRequired('data_class')
Expand Down
9 changes: 3 additions & 6 deletions Form/Type/Profile/ProfileType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ public function finishView(FormView $view, FormInterface $form, array $options):
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
'csrf_token_id' => md5(__FILE__.$this->getBlockPrefix()),
'validation_groups' => [
'Default',
'Profile',
],
->setDefault('validation_groups', [
'Default',
'Profile',
])
->remove('data_class')
->setRequired('data_class')
Expand Down
7 changes: 2 additions & 5 deletions Form/Type/Security/PasswordResetType.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ public function finishView(FormView $view, FormInterface $form, array $options):
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
'csrf_token_id' => md5(__FILE__.$this->getBlockPrefix()),
'validation_groups' => [
'PasswordReset',
],
->setDefault('validation_groups', [
'PasswordReset',
])
->remove('data_class')
->setRequired('data_class')
Expand Down
9 changes: 3 additions & 6 deletions Form/Type/Security/RegistrationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ public function finishView(FormView $view, FormInterface $form, array $options):
public function configureOptions(OptionsResolver $resolver): void
{
$resolver
->setDefaults([
'csrf_token_id' => md5(__FILE__.$this->getBlockPrefix()),
'validation_groups' => [
'Default',
'Register',
],
->setDefault('validation_groups', [
'Default',
'Register',
])
->remove('data_class')
->setRequired('data_class')
Expand Down

0 comments on commit d0eb8db

Please sign in to comment.