diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-08-11 09:59:40 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-08-26 15:48:31 +0300 |
commit | bafffb2d14e1924154d5b7c74c7b3cbcf8c898fd (patch) | |
tree | 9e404f30a04e41e2e70456f2959a1780717981ae /app/models/hooks | |
parent | add099b024cc4155a5be494fdb9ae339fd073a14 (diff) | |
download | gitlab-ce-bafffb2d14e1924154d5b7c74c7b3cbcf8c898fd.tar.gz |
Enable SSL verification for Webhooksenable_ssl_verification_web_hook
Diffstat (limited to 'app/models/hooks')
-rw-r--r-- | app/models/hooks/web_hook.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index 46fb85336e5..9a8251bdad5 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -25,6 +25,7 @@ class WebHook < ActiveRecord::Base default_value_for :note_events, false default_value_for :merge_requests_events, false default_value_for :tag_push_events, false + default_value_for :enable_ssl_verification, false # HTTParty timeout default_timeout Gitlab.config.gitlab.webhook_timeout @@ -41,7 +42,7 @@ class WebHook < ActiveRecord::Base "Content-Type" => "application/json", "X-Gitlab-Event" => hook_name.singularize.titleize }, - verify: false) + verify: enable_ssl_verification) else post_url = url.gsub("#{parsed_url.userinfo}@", "") auth = { @@ -54,7 +55,7 @@ class WebHook < ActiveRecord::Base "Content-Type" => "application/json", "X-Gitlab-Event" => hook_name.singularize.titleize }, - verify: false, + verify: enable_ssl_verification, basic_auth: auth) end rescue SocketError, Errno::ECONNRESET, Errno::ECONNREFUSED, Net::OpenTimeout => e |