From 635bb114d948af1cf5cf6e0483e6a25bccdf77f6 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Fri, 7 Mar 2014 16:43:30 +0100 Subject: Restrict env variables passed to git-xxx-pack --- lib/gitlab_shell.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/gitlab_shell.rb') 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 -- cgit v1.2.1