IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Browse Source

Protect against spaces in env vars

tags/0.92
parent
commit
8ce36a4542
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      jail.py

+ 2
- 0
jail.py View File

@@ -27,6 +27,8 @@ def jail_fs_create(image):
def gen_env_command(command, env):
if any(map(lambda a: ' ' in a, env.keys())):
raise ValueError('Environment variable names cannot contain spaces')
env = [ 'export ' + k + '=' + shlex.quote(v) \
for (k, v) in env.items() ]
command = ' && '.join(env + [ command ])


Loading…
Cancel
Save