Skip to content
Snippets Groups Projects

Fix sub-second timing comparison error for Devise confirmation period

Merged Stan Hu requested to merge sh-fix-almost-there-spec-mysql into master
All threads resolved!

On databases such as MySQL, it's possible to get into a timing comparison error if the value of Confirmable#confirmation_sent_at is within a second of 0.days.ago. This is possible mostly in specs that test this behavior and most likely not happening in practice. The result of this error causes a user to be deemed active when it should be inactive. To prevent this error, we explicitly check the configuration setting to be 0.days.ago.

Closes gitlab-org/gitlab-ee#2362

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @stanhu great investigation, thanks 🙂

  • assigned to @smcgivern

  • username-removed-443319 approved this merge request

    approved this merge request

  • username-removed-443319 resolved all discussions

    resolved all discussions

  • mentioned in commit 09e2c1af

  • mentioned in commit 848466ee

  • Picked into 9-2-stable, will go into 9.2.0-rc1.

  • Please register or sign in to reply
    Loading