Skip to content

Conversation

grantcox
Copy link

@grantcox grantcox commented Jul 7, 2025

Fixes #5783

…s always saved even if the submitted value is the same as the in-memory model's state
Copy link

@runephilosof-abtion runephilosof-abtion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way to solve this, would be to use transactions and locking for update.
However, that might be a problem for some database backends?
Anyway, transactions have not been used anywhere else in Devise and the approach in this PR works.

Co-authored-by: Rune Philosof <57357936+runephilosof-abtion@users.noreply.github.com>
@grantcox grantcox force-pushed the email-confirmation-race-condition-vulnfix branch from cfa56a4 to 502ed42 Compare August 7, 2025 18:27
@grantcox
Copy link
Author

grantcox commented Aug 7, 2025

Thank you for the feedback @runephilosof-abtion , your changes were very helpful and I've merged them all now

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.

Confirmable "change email" vulnerability - race condition permits user to confirm email address they have no access to
2 participants