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:29:22 +0100
commit5ae0d61d0a457ebaeed78f6acd01447b5760e75a (patch)
tree7c0d7eee4e14bd0452f9f710252e9c47f25ee6eb
parent1fc42d9934fbf511db2a28e980b298c019a217a7 (diff)
downloadgitlab-ce-5ae0d61d0a457ebaeed78f6acd01447b5760e75a.tar.gz
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.
-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