summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-01-15 15:16:19 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-01-15 15:32:54 +0100
commit317362666be9358a8fccb4e0e9c4640bb1a2ef71 (patch)
tree98babdcc9ae17970047a7770fd34ee98b3a00396
parent38397dbed22fe19eb25b235c02dbf1196283b79e (diff)
downloadgitlab-ce-6-4-stable.tar.gz
Disable SSL peer verification for all webhooks6-4-stable
SSL peer verification was silently enabled by the HTTParty upgrade in 8a54fda45957b3755f7c06e5c9b955c794488ff1. This patch restores the previous behaviour of GitLab 6.3 and earlier.
-rw-r--r--app/models/web_hook.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/web_hook.rb b/app/models/web_hook.rb
index c0aa3734917..8a5c4b6cd47 100644
--- a/app/models/web_hook.rb
+++ b/app/models/web_hook.rb
@@ -28,7 +28,7 @@ class WebHook < ActiveRecord::Base
def execute(data)
parsed_url = URI.parse(url)
if parsed_url.userinfo.blank?
- WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" })
+ WebHook.post(url, body: data.to_json, headers: { "Content-Type" => "application/json" }, verify: false)
else
post_url = url.gsub("#{parsed_url.userinfo}@", "")
auth = {
@@ -38,6 +38,7 @@ class WebHook < ActiveRecord::Base
WebHook.post(post_url,
body: data.to_json,
headers: {"Content-Type" => "application/json"},
+ verify: false,
basic_auth: auth)
end
end