diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /lib/gitlab/http.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'lib/gitlab/http.rb')
-rw-r--r-- | lib/gitlab/http.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/gitlab/http.rb b/lib/gitlab/http.rb index 8b19611e5c0..feb54fcca0c 100644 --- a/lib/gitlab/http.rb +++ b/lib/gitlab/http.rb @@ -1,9 +1,13 @@ # frozen_string_literal: true -# This class is used as a proxy for all outbounding http connection -# coming from callbacks, services and hooks. The direct use of the HTTParty -# is discouraged because it can lead to several security problems, like SSRF -# calling internal IP or services. +# +# IMPORTANT: With the new development of the 'gitlab-http' gem (https://gitlab.com/gitlab-org/gitlab/-/issues/415686), +# no additional change should be implemented in this class. This class will be removed after migrating all +# the usages to the new gem. +# + +require_relative 'http_connection_adapter' + module Gitlab class HTTP BlockedUrlError = Class.new(StandardError) @@ -42,7 +46,7 @@ module Gitlab alias_method :httparty_perform_request, :perform_request end - connection_adapter HTTPConnectionAdapter + connection_adapter ::Gitlab::HTTPConnectionAdapter def self.perform_request(http_method, path, options, &block) raise_if_blocked_by_silent_mode(http_method) |