Aaron Patterson
3e23752236
bcrypt will encrypt anything, so validate_presence_of would not catch nil / blank passwords. Thank you to Aleksander Kamil Modzelewski for reporting this
2011-04-14 14:54:25 -07:00
Brian Cardarella
a8365ab9ad
Declaring the attr_accessor for password_confirmation is not necessary
...
as the confirmation validation already adds that attr_accessor
2011-04-14 16:43:51 +08:00
Tsutomu Kuroda
ad31549ab3
Override attributes_protected_by_default when has_secure_password is called.
...
attr_protected should not be called, because it nullifies the
mass assignment protection that has been set by attr_accessible.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-02-09 18:35:15 -02:00
David Heinemeier Hansson
43433b3fb4
Instance methods shouldnt be added until you actually call has_secure_password
2010-12-29 10:18:14 -08:00
Santiago Pastorino
ab2bde45f8
Remove require AS::Concern from places where is already in
2010-12-19 19:15:26 -02:00
Santiago Pastorino
08ccd29b5b
Remove weak_passwords list and the length/strong password validator, leave that up to the programmer
2010-12-19 15:01:29 -02:00
José Valim
6d80f3a1ba
Use class_attribute to ensure weak_passwords are inheritable.
2010-12-19 13:31:48 +01:00
Mikel Lindsaar
6c217f98db
Add set_weak_passwords call in alignment with set_table_name.
2010-12-19 21:36:47 +11:00
Mikel Lindsaar
fa14df08a8
Fix incorrect docs
2010-12-19 20:54:15 +11:00
Mikel Lindsaar
a39a333769
Added ability to specify which passwords you want as weak passwords
2010-12-19 20:39:54 +11:00
José Valim
863de37b05
'unsecure' => 'insecure'
2010-12-19 09:37:08 +01:00
José Valim
432556b923
Make password messages translatable.
2010-12-19 09:34:31 +01:00
José Valim
b8f6dd8cbb
Add missing require and remove extra module.
2010-12-19 09:31:26 +01:00
José Valim
d592fa946d
Avoid warnings and fix small typo on SecurePassword.
2010-12-19 09:28:15 +01:00
David Heinemeier Hansson
bd9dc4ff23
BCrypt does its own salting, lovely!
2010-12-18 19:09:07 -08:00
David Heinemeier Hansson
39b5ea6e01
Switch from SHA2 to BCrypt (easy Windows compatibility is coming shortly with new compiled gem)
2010-12-18 15:39:32 -08:00
David Heinemeier Hansson
bcf4e4f2b0
Added ActiveRecord::Base#has_secure_password (via ActiveModel::SecurePassword) to encapsulate dead-simple password usage with SHA2 encryption and salting
2010-12-18 13:38:05 -08:00