Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-02-09 18:02:11 +0300
committerJames Lopez <james@jameslopez.es>2018-03-07 17:34:01 +0300
commit235e87a3b98f0a5831789335252f2cef7065d9ae (patch)
treeaa54ac669c6f3404c259b2ef87860a35f19d3670 /app
parent86e95c4eb7df3987cf3258bdea305c0851259e98 (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.rb1
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!