mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Do not write the env explicitly in the command to avoid leaking secrets in ps -ef...
This commit is contained in:
parent
e0ac7de432
commit
14f6f09993
1 changed files with 1 additions and 5 deletions
|
@ -396,17 +396,13 @@ def _hook_exec_bash(path, args, chdir, env, return_format, loggers):
|
|||
# use xtrace on fd 7 which is redirected to stdout
|
||||
cmd = 'BASH_XTRACEFD=7 /bin/bash -x "{script}" {args} 7>&1'
|
||||
|
||||
# prepend environment variables
|
||||
cmd = '{0} {1}'.format(
|
||||
' '.join(['{0}={1}'.format(k, shell_quote(v))
|
||||
for k, v in env.items()]), cmd)
|
||||
command.append(cmd.format(script=cmd_script, args=cmd_args))
|
||||
|
||||
logger.debug("Executing command '%s'" % ' '.join(command))
|
||||
|
||||
returncode = call_async_output(
|
||||
command, loggers, shell=False, cwd=chdir,
|
||||
stdinfo=stdinfo
|
||||
stdinfo=stdinfo, env=env
|
||||
)
|
||||
|
||||
raw_content = None
|
||||
|
|
Loading…
Add table
Reference in a new issue