add csrf protection
This commit is contained in:
parent
642492411e
commit
ef45c6cd28
@ -50,6 +50,9 @@ class CompanyFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => CompanyDetailsDto::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'company',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,9 @@ class EditUserFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => User::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'edit_user',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +67,9 @@ class MemberCaseFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => MemberCase::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'member_case',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -75,6 +75,9 @@ class MemberFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Member::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'member',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,9 @@ class ReferralFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Referral::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'referral',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,9 @@ class ReferralSourceFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => ReferralSource::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'referral_source',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +98,9 @@ class ResourceFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => CommunityResource::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'community_resource',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,9 @@ class StaffNoteFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => StaffNote::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'staff_note',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,9 @@ class SupervisorFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => Supervision::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'supervisor',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,9 @@ class SupervisorStaffNoteFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => StaffNote::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'supervisor_staff_note',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -29,6 +29,9 @@ class UserCaseFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => UserCase::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'user_case',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\EnumType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
@ -71,6 +72,7 @@ class UserFormType extends AbstractType
|
||||
'class' => RateType::class,
|
||||
])
|
||||
->add('rate', NumberType::class)
|
||||
->add('imageName', FileType::class)
|
||||
;
|
||||
}
|
||||
|
||||
@ -78,6 +80,9 @@ class UserFormType extends AbstractType
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => User::class,
|
||||
'csrf_protection' => true,
|
||||
'csrf_field_name' => '_token',
|
||||
'csrf_token_id' => 'user',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user