Sanitize the entire geo_return_to_after_login url

parent 808c2872
......@@ -41,7 +41,7 @@ module EE
end
def geo_return_to_after_login
::Gitlab::Utils.append_path(root_url, sanitize_redirect(session[:user_return_to].to_s))
sanitize_redirect(::Gitlab::Utils.append_path(root_url, session[:user_return_to].to_s))
end
def geo_return_to_after_logout
......
......@@ -28,7 +28,7 @@ describe SessionsController do
expect(response).to have_gitlab_http_status(302)
expect(response).to redirect_to %r(\A#{primary_node.url}oauth/geo/auth)
expect(redirect_params['state'].first).to end_with(':/')
expect(redirect_params['state'].first).to end_with(':')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment