Commit 71857224 authored by Valery Sizov's avatar Valery Sizov

Clean environment variables when running git hooks

parent 0a8b6630
...@@ -135,6 +135,7 @@ v 8.12.0 (unreleased) ...@@ -135,6 +135,7 @@ v 8.12.0 (unreleased)
- Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225 - Return 204 instead of 404 for /ci/api/v1/builds/register.json if no builds are scheduled for a runner !6225
- Fix Gitlab::Popen.popen thread-safety issue - Fix Gitlab::Popen.popen thread-safety issue
- Add specs to removing project (Katarzyna Kobierska Ula Budziszewska) - Add specs to removing project (Katarzyna Kobierska Ula Budziszewska)
- Clean environment variables when running git hooks
v 8.11.6 v 8.11.6
- Fix unnecessary horizontal scroll area in pipeline visualizations. !6005 - Fix unnecessary horizontal scroll area in pipeline visualizations. !6005
......
...@@ -17,6 +17,7 @@ module Gitlab ...@@ -17,6 +17,7 @@ module Gitlab
def trigger(gl_id, oldrev, newrev, ref) def trigger(gl_id, oldrev, newrev, ref)
return [true, nil] unless exists? return [true, nil] unless exists?
Bundler.with_clean_env do
case name case name
when "pre-receive", "post-receive" when "pre-receive", "post-receive"
call_receive_hook(gl_id, oldrev, newrev, ref) call_receive_hook(gl_id, oldrev, newrev, ref)
...@@ -24,6 +25,7 @@ module Gitlab ...@@ -24,6 +25,7 @@ module Gitlab
call_update_hook(gl_id, oldrev, newrev, ref) call_update_hook(gl_id, oldrev, newrev, ref)
end end
end end
end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment