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!
Sfoglia il codice sorgente

Protect against spaces in env vars

tags/0.92
parent
commit
8ce36a4542
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. +2
    -0
      jail.py

+ 2
- 0
jail.py Vedi 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…
Annulla
Salva