Always stringify form values before sending them to a script callback.

pull/7/head
Ferry Boender 10 years ago
parent ec93afa1ac
commit a8c1ba64a3
  1. 4
      src/scriptform.py

@ -598,8 +598,10 @@ class ScriptForm:
return self.callback_python(form, form_values, output_fh)
def callback_script(self, form, form_values, output_fh=None):
# Pass form values to the script through the environment as strings.
env = os.environ.copy()
env.update(form_values)
for k, v in form_values.items():
env[k] = str(v)
if form.script_raw:
p = subprocess.Popen(form.script, shell=True, stdout=output_fh,

Loading…
Cancel
Save