summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-03-07 16:43:30 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-03-07 16:43:30 +0100
commit635bb114d948af1cf5cf6e0483e6a25bccdf77f6 (patch)
treea401576f483ca8e44842b2b9f866f92c4a37fe91 /lib/gitlab_shell.rb
parent79bceae69cb5750d6567b223597999bfa91cb3b9 (diff)
downloadgitlab-shell-635bb114d948af1cf5cf6e0483e6a25bccdf77f6.tar.gz
Restrict env variables passed to git-xxx-pack
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r--lib/gitlab_shell.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 6dbd1ce..82c2ef9 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -59,8 +59,8 @@ class GitlabShell
api.allowed?(@git_cmd, @repo_name, @key_id, '_any')
end
- def exec_cmd *args
- Kernel::exec *args
+ def exec_cmd(*args)
+ Kernel::exec({'PATH' => ENV['PATH'], 'GL_ID' => ENV['GL_ID']}, *args, unset_env_others: true)
end
def api