From 5db7af0ce437139a62fec941c5d84e81a0a6ff8b Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Mon, 10 May 2021 00:38:10 -0400 Subject: [PATCH] Test that quotes and ampersand are XML escaped This ensures that we are safe if we interpolate into an XML attribute. --- qubes/tests/vm/qubesvm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/tests/vm/qubesvm.py b/qubes/tests/vm/qubesvm.py index 75815af4..5830e453 100644 --- a/qubes/tests/vm/qubesvm.py +++ b/qubes/tests/vm/qubesvm.py @@ -961,7 +961,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase): hvmloader - kernel <text> specific options + kernel <text>'"& specific options @@ -1000,7 +1000,7 @@ class TC_90_QubesVM(QubesVMTestsMixin, qubes.tests.QubesTestCase): open(os.path.join(kernel_dir, 'initramfs'), 'w').close() with open(os.path.join(kernel_dir, 'default-kernelopts-common.txt'), 'w') as f: - f.write('kernel specific options \n') + f.write('kernel \'"& specific options \n') self.addCleanup(shutil.rmtree, '/tmp/qubes-test') vm.kernel = 'dummy' libvirt_xml = vm.create_config_file()