Defect #35087 ยป 35087.patch
| app/controllers/account_controller.rb | ||
|---|---|---|
|
# prevents login action to be filtered by check_if_login_required application scope filter
|
||
|
skip_before_action :check_if_login_required, :check_password_change
|
||
|
skip_before_action :check_twofa_activation, :only => :logout
|
||
|
# Overrides ApplicationController#verify_authenticity_token to disable
|
||
|
# token verification on openid callbacks
|
||
| test/integration/twofa_test.rb | ||
|---|---|---|
|
end
|
||
|
end
|
||
|
test 'should allow logout even if twofa setup is required' do
|
||
|
with_settings twofa: '2' do
|
||
|
log_user('jsmith', 'jsmith')
|
||
|
follow_redirect!
|
||
|
assert_redirected_to '/my/twofa/totp/activate/confirm'
|
||
|
follow_redirect!
|
||
|
post '/logout'
|
||
|
assert_redirected_to '/'
|
||
|
follow_redirect!
|
||
|
assert_response :success
|
||
|
end
|
||
|
end
|
||
|
test "should generate and accept backup codes" do
|
||
|
log_user('jsmith', 'jsmith')
|
||
|
get "/my/account"
|
||