Bee-Lab / BeelabUserBundle

:busts_in_silhouette: Simple user management for Symfony.
17 stars 5 forks source link

Default password field length is too short for bcrypted passwords #1

Closed mattattui closed 10 years ago

mattattui commented 10 years ago

bcrypted password hashes are 60 characters long, but the User entity defines $password as a 40-char column:

    /**
     * @ORM\Column(length=40)
     */
    protected $password;

There's little benefit to limiting the length of this field, so I suggest increasing it to 255 characters to allow for future password encoders.

While you're at it, changing the example encoder from a single iteration of sha1 would be nice, since many people will cut & paste it without realising how weak it is.

Happy to make a pull request for both these changes if you like.

garak commented 10 years ago

Sure, a PR would be more than welcome!

garak commented 10 years ago

Fixed in #2