Skip to content

Conversation

@kpumuk
Copy link

@kpumuk kpumuk commented May 29, 2025

When User.unlock_access_by_token is used, Devise unlocks access to the user, and sets the unlock_token attribute to the original non-digested token, passed as an argument. If we are to set any other attributes on the unlocked user and save the record, the non-digested token is persisted in the database.

This does not seem to pose any security risks (at least I cannot find any), but I also see no benefit in such behaviour.

History

The change was originally introduced in 354e502 to both Lockable and Confirmable, with insecure token lookups removed in 6b3b0c5, and digests removed from Confirmable in eb640ed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant