Login for 2fa users fails after a restore
Hi,
I have a production CE instance running 7.11.4. Some users have 2FA enabled. When I take a backup of the system it completes without errors, however when restored into a fresh instance. The users with 2FA fail to login and the system throws a 500 error.
Both machines were built from the same script, so the gitlab.rb and all other settings are the same. The rails and nginx logs are shown below:
/var/log/gitlab/gitlab-rails/production.log
Started POST "/users/sign_in" for 2.2.2.2 at 2015-07-10 13:15:30 +0000
Processing by SessionsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"otp_attempt"=>"[FILTERED]"}}
Completed 500 Internal Server Error in 91ms
OpenSSL::Cipher::CipherError (bad decrypt):
app/controllers/sessions_controller.rb:79:in `valid_otp_attempt?'
app/controllers/sessions_controller.rb:62:in `authenticate_with_two_factor'
/var/log/gitlab/nginx/gitlab_access.log
2.2.2.2 - - [10/Jul/2015:13:15:30 +0000] "POST /users/sign_in HTTP/1.1" 500 415 "https://1.1.1.1/users/sign_in" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"