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
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-27 12:53:40 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-27 12:53:40 +0300
commit3ed05b2191a7ede4734e2b7952f3810e5a1ee728 (patch)
tree01c88b0fec5666c7d5a03e5ed21b7dee5efed517 /app/controllers
parent1dbfecb2bb08a7d20d10a13c1c7898ee562a6594 (diff)
parent7b879bb8bded3aa7577133a9bc2be0c7fc97d855 (diff)
Merge branch 'rs-manual-2fa-entry' into 'master'
Add support for manually entering 2FA details > ![Screen_Shot_2015-05-22_at_6.39.26_PM](https://gitlab.com/gitlab-org/gitlab-ce/uploads/27b6cc0b2f88e0ccec234dd8d20db957/Screen_Shot_2015-05-22_at_6.39.26_PM.png) Related to #1679 though I'm not sure if it entirely fixes it, since I don't have access to a Windows Phone. See merge request !694
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/profiles/two_factor_auths_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/profiles/two_factor_auths_controller.rb b/app/controllers/profiles/two_factor_auths_controller.rb
index 30ee6891733..42579b3eb44 100644
--- a/app/controllers/profiles/two_factor_auths_controller.rb
+++ b/app/controllers/profiles/two_factor_auths_controller.rb
@@ -1,7 +1,7 @@
class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
def new
unless current_user.otp_secret
- current_user.otp_secret = User.generate_otp_secret
+ current_user.otp_secret = User.generate_otp_secret(32)
current_user.save!
end
@@ -18,6 +18,7 @@ class Profiles::TwoFactorAuthsController < Profiles::ApplicationController
else
@error = 'Invalid pin code'
@qr_code = build_qr_code
+
render 'new'
end
end