Commit 5ae0d61d0a457ebaeed78f6acd01447b5760e75a

Authored by Jacob Vosmaer
1 parent 1fc42d99

Disable SSL peer verification for all webhooks

SSL peer verification was silently enabled by the HTTParty upgrade in
8a54fda45957b3755f7c06e5c9b955c794488ff1. This patch restores the
previous behaviour of GitLab 6.3 and earlier.
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/models/web_hook.rb
... ... @@ -28,7 +28,7 @@ class WebHook < ActiveRecord::Base
28 28 def execute(data)
29 29 parsed_url = URI.parse(url)
30 30 if parsed_url.userinfo.blank?
31   - WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" })
  31 + WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" }, verify: false)
32 32 else
33 33 post_url = url.gsub("#{parsed_url.userinfo}@", "")
34 34 auth = {
... ... @@ -38,6 +38,7 @@ class WebHook < ActiveRecord::Base
38 38 WebHook.post(post_url,
39 39 body: data.to_json,
40 40 headers: {"Content-Type" => "application/json"},
  41 + verify: false,
41 42 basic_auth: auth)
42 43 end
43 44 end
... ...