From 45e8b54beabb7d1ba9a9f0909c3cc2d0d572a8e4 Mon Sep 17 00:00:00 2001 From: Dennis Schubert Date: Tue, 11 Feb 2020 22:35:10 +0100 Subject: [PATCH] Check for status codes instead of relying on response.redirect?. Rack did so much refactoring, we do not see a Response object here anymore. --- .../api/openid_connect/authorizations_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/openid_connect/authorizations_controller.rb b/app/controllers/api/openid_connect/authorizations_controller.rb index bc35f11b9..555a718b3 100644 --- a/app/controllers/api/openid_connect/authorizations_controller.rb +++ b/app/controllers/api/openid_connect/authorizations_controller.rb @@ -104,8 +104,9 @@ module Api end def handle_start_point_response(endpoint) - _status, header, response = endpoint.call(request.env) - if response.redirect? + status, header, _response = endpoint.call(request.env) + + if status.in?([301, 302, 303, 307, 308]) redirect_to header["Location"] else save_params_and_render_consent_form(endpoint)