Within the :database_authenticatable there is an issue at Line 40
Whenever the passwords are cleaned (set to nil), e.g. in the RegistrationsController the encrypted_password remains dirty, which can have heavy security affecting side-effects.
I propose to set the encrypted_password also to nil or to revert to its original value. Here is a little test scenario:
model.password = 'abc'
model.password = nil
model.valid_password? 'abc' => true
Within the :database_authenticatable there is an issue at Line 40
Whenever the passwords are cleaned (set to
nil), e.g. in the RegistrationsController the encrypted_password remains dirty, which can have heavy security affecting side-effects.I propose to set the encrypted_password also to
nilor to revert to its original value. Here is a little test scenario: