In my Symfony project, I am using the FOS user bundle.
In my secutity.yml I have this in order to use bcrypt encoder:
security:
# FOS UserBundle needles
encoders:
Symfony\Component\Security\Core\User\User: bcrypt
MyNamespace\MyBundle\Entity\User: bcrypt
FOS\UserBundle\Model\UserInterface: bcrypt
I call the fos user registration form in an embeded form like this:
$builder
->add('contactPhone')
->add('contactMobilePhone')
->add('user', 'fos_user_registration', array(
'label' => false,
))
It renders me this for example:
But when I submit the form, I could see in the network console browser that my password are in plain text and everybody could use them.
So I can recover all datas of my POST request in the console browser:
my_form[user][email]=test@test.com
my_form[contactPhone]=0404040404
my_form[contactMobilePhone]=0606060606
my_form[user][username]=test
my_form[user][plainPassword][first]=test
// first password entry
my_form[user][plainPassword][second]=test
// verification
my_form[save]
// submit my_form[_token_consumer]=// no need to see him
You could understand That iit's not secured. I need to encode the password when I submit the form in order to not allow everybody to see them.
Note that the same thing occured when I log myself with the FOSUserBundle user login form.