diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-03-13 22:38:25 +0000 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2018-03-21 14:39:21 +0000 |
commit | 95ced3bb5fa52e166aa03ee592f63180601cbde7 (patch) | |
tree | 8e75e6ccf9a443ba004b11891b84518fd7cfe884 /lib/microsoft_teams | |
parent | 30c480c2b3f4709f592d8b095f8653df940f6845 (diff) | |
download | gitlab-ce-95ced3bb5fa52e166aa03ee592f63180601cbde7.tar.gz |
Merge branch 'fj-15329-services-callbacks-ssrf' into 'security-10-6'
Server Side Request Forgery in Services and Web Hooks
See merge request gitlab/gitlabhq!2337
Diffstat (limited to 'lib/microsoft_teams')
-rw-r--r-- | lib/microsoft_teams/notifier.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/microsoft_teams/notifier.rb b/lib/microsoft_teams/notifier.rb index 3bef68a1bcb..c08d3e933a8 100644 --- a/lib/microsoft_teams/notifier.rb +++ b/lib/microsoft_teams/notifier.rb @@ -9,14 +9,15 @@ module MicrosoftTeams result = false begin - response = HTTParty.post( + response = Gitlab::HTTP.post( @webhook.to_str, headers: @header, + allow_local_requests: true, body: body(options) ) result = true if response - rescue HTTParty::Error, StandardError => error + rescue Gitlab::HTTP::Error, StandardError => error Rails.logger.info("#{self.class.name}: Error while connecting to #{@webhook}: #{error.message}") end |