diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-02-09 18:02:11 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-03-07 17:34:01 +0300 |
commit | 235e87a3b98f0a5831789335252f2cef7065d9ae (patch) | |
tree | aa54ac669c6f3404c259b2ef87860a35f19d3670 /app | |
parent | 86e95c4eb7df3987cf3258bdea305c0851259e98 (diff) |
Merge branch 'sh-fix-otp-backup-invalidation-10-5' into 'security-10-5'
Ensure that OTP backup codes are always invalidated - 10.5 port
See merge request gitlab/gitlabhq!2324
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/concerns/authenticates_with_two_factor.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb index db8c362f125..2753f83c3cf 100644 --- a/app/controllers/concerns/authenticates_with_two_factor.rb +++ b/app/controllers/concerns/authenticates_with_two_factor.rb @@ -56,6 +56,7 @@ module AuthenticatesWithTwoFactor session.delete(:otp_user_id) remember_me(user) if user_params[:remember_me] == '1' + user.save! sign_in(user) else user.increment_failed_attempts! |