Skip to content

:database_authenticatable issue with clean_passwords #4245

@eppdot

Description

@eppdot

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions