From: Simon McVittie Date: Thu, 23 Jun 2022 18:27:24 +0000 (+0100) Subject: test: Avoid arbitrary Python injection if compiled in a path with quotes X-Git-Tag: dbus-1.15.0~32^2~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60afeaa5d6430636bbd6e91a5b7c3a09e6facb66;p=thirdparty%2Fdbus.git test: Avoid arbitrary Python injection if compiled in a path with quotes Signed-off-by: Simon McVittie --- diff --git a/test/meson.build b/test/meson.build index e1d14fecd..e65c5c384 100644 --- a/test/meson.build +++ b/test/meson.build @@ -76,7 +76,9 @@ test_env.set('DBUS_TEST_UNINSTALLED', '1') xdgdir = custom_target('gen-xdgdir', command: [ - python, '-c', 'import os; os.makedirs("@0@", exist_ok=True)'.format(meson.current_build_dir() / 'XDG_RUNTIME_DIR') + python, '-c', + 'import os, sys; os.makedirs(sys.argv[1], exist_ok=True)', + meson.current_build_dir() / 'XDG_RUNTIME_DIR', ], output: 'XDG_RUNTIME_DIR' )