mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
update_with_password doesn't change encrypted password when it is invalid
closes #2130
This commit is contained in:
@@ -64,6 +64,7 @@ module Devise
|
||||
result = if valid_password?(current_password)
|
||||
update_attributes(params, *options)
|
||||
else
|
||||
params.delete(:password)
|
||||
self.assign_attributes(params, *options)
|
||||
self.valid?
|
||||
self.errors.add(:current_password, current_password.blank? ? :blank : :invalid)
|
||||
|
||||
Reference in New Issue
Block a user