mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 04:36:11 +10:00
Disable SSL peer verification for all webhooks
SSL peer verification was silently enabled by the HTTParty upgrade in
8a54fda459. This patch restores the
previous behaviour of GitLab 6.3 and earlier.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user