doc: avoid Python injection if filenames contain quotes

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-06-24 12:15:14 +01:00
parent 1582f713a3
commit e6e2370e9e
3 changed files with 14 additions and 3 deletions

View File

@ -224,6 +224,7 @@ clean-local:
rm -f *.1.html
rm -f doxygen.stamp
EXTRA_DIST += list-doc-source.py
EXTRA_DIST += maintainer-upload-docs.sh
EXTRA_DIST += meson.build
EXTRA_DIST += meson_post_install.py

9
doc/list-doc-source.py Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env python3
# Copyright © 2019-2020 Salamandar <felix@piedallu.me>
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: MIT
import glob
import sys
print('\n'.join(glob.glob(sys.argv[1] + '/*.[ch]')))

View File

@ -176,9 +176,10 @@ if doxygen.found()
dbus_srcs = run_command(
python,
'-c',
'''from glob import glob;print('\n'.join(glob('@0@/*.[ch]')))'''.format(meson.project_source_root() / 'dbus'),
check: true).stdout().strip().split('\n')
files('list-doc-source.py'),
meson.project_source_root() / 'dbus',
check: true
).stdout().strip().split('\n')
dbus_srcs += dbus_arch_deps_h
doxygen_tgt = custom_target('doxygen',