Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/concerns/rate_limit_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def rate_limited_redirect(rate_limit_type)
when :idv_resolution
redirect_to idv_session_errors_failure_url
when :idv_doc_auth
redirect_to idv_session_errors_throttled_url
redirect_to idv_session_errors_rate_limited_url
when :proof_address
redirect_to idv_phone_errors_failure_url
when :proof_ssn
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/idv/capture_doc_status_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def redirect_url
return unless flow_session && document_capture_session

if rate_limiter.limited?
idv_session_errors_throttled_url
idv_session_errors_rate_limited_url
elsif user_has_establishing_in_person_enrollment?
idv_in_person_url
end
Expand Down
2 changes: 1 addition & 1 deletion app/presenters/image_upload_response_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def as_json(*)
json = { success: false, errors: errors, remaining_attempts: remaining_attempts }
if remaining_attempts&.zero?
if @form_response.extra[:flow_path] == 'standard'
json[:redirect] = idv_session_errors_throttled_url
json[:redirect] = idv_session_errors_rate_limited_url
else # hybrid flow on mobile
json[:redirect] = idv_hybrid_mobile_capture_complete_url
end
Expand Down
2 changes: 1 addition & 1 deletion app/services/idv/steps/doc_auth_base_step.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def rate_limited_response
end

def rate_limited_url
idv_session_errors_throttled_url
idv_session_errors_rate_limited_url
end

# Ideally we would not have to re-implement the EffectiveUser mixin
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@
get '/session/errors/failure' => 'session_errors#failure'
get '/session/errors/ssn_failure' => 'session_errors#ssn_failure'
get '/session/errors/exception' => 'session_errors#exception'
get '/session/errors/throttled' => 'session_errors#rate_limited'
get '/session/errors/rate_limited' => 'session_errors#rate_limited'
get '/setup_errors', to: redirect('/please_call')
get '/not_verified' => 'not_verified#show'
Expand Down Expand Up @@ -412,6 +411,7 @@
post '/confirmations' => 'personal_key#update'
get '/doc_auth/:step', to: redirect('/verify/welcome')
get '/doc_auth/link_sent/poll' => 'capture_doc_status#show'
get '/session/errors/throttled', to: redirect('/verify/session/errors/rate_limited')
end

# Old paths to GPO outside of IdV.
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/concerns/rate_limit_concern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def update

get :show

expect(response).to redirect_to idv_session_errors_throttled_url
expect(response).to redirect_to idv_session_errors_rate_limited_url
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/idv/document_capture_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

get :show

expect(response).to redirect_to(idv_session_errors_throttled_url)
expect(response).to redirect_to(idv_session_errors_rate_limited_url)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/idv/image_uploads_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
end

context 'when rate limited' do
let(:redirect_url) { idv_session_errors_throttled_url }
let(:redirect_url) { idv_session_errors_rate_limited_url }
let(:error_json) do
{
success: false,
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/idv_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
it 'redirects to rate limited page' do
get :index

expect(response).to redirect_to idv_session_errors_throttled_url
expect(response).to redirect_to idv_session_errors_rate_limited_url
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/features/idv/doc_auth/document_capture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
)
message = strip_tags(t('errors.doc_auth.rate_limited_text_html', timeout: timeout))
expect(page).to have_content(message)
expect(page).to have_current_path(idv_session_errors_throttled_path)
expect(page).to have_current_path(idv_session_errors_rate_limited_path)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/features/idv/hybrid_mobile/hybrid_mobile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
end

perform_in_browser(:desktop) do
expect(page).to have_current_path(idv_session_errors_throttled_path, wait: 10)
expect(page).to have_current_path(idv_session_errors_rate_limited_path, wait: 10)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/presenters/image_upload_response_presenter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
success: false,
result_failed: false,
errors: [{ field: :limit, message: t('errors.doc_auth.rate_limited_heading') }],
redirect: idv_session_errors_throttled_url,
redirect: idv_session_errors_rate_limited_url,
remaining_attempts: 0,
ocr_pii: nil,
}
Expand Down Expand Up @@ -244,7 +244,7 @@
result_failed: false,
errors: [{ field: :front, message: t('doc_auth.errors.not_a_file') }],
hints: true,
redirect: idv_session_errors_throttled_url,
redirect: idv_session_errors_rate_limited_url,
remaining_attempts: 0,
ocr_pii: nil,
}
Expand Down