Skip to content

Commit

Permalink
Test that quotes and ampersand are XML escaped
Browse files Browse the repository at this point in the history
This ensures that we are safe if we interpolate into an XML attribute.
  • Loading branch information
DemiMarie committed May 13, 2021
1 parent f9bfcd8 commit 5db7af0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qubes/tests/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def test_600_libvirt_xml_hvm_dom0_kernel_kernelopts(self):
<loader type="rom">hvmloader</loader>
<boot dev="cdrom" />
<boot dev="hd" />
<cmdline>kernel &lt;text&gt; specific options</cmdline>
<cmdline>kernel &lt;text&gt;&#39;&#34;&amp; specific options</cmdline>
</os>
<features>
<pae/>
Expand Down Expand Up @@ -1000,7 +1000,7 @@ def test_600_libvirt_xml_hvm_dom0_kernel_kernelopts(self):
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 <text> specific options \n')
f.write('kernel <text>\'"& specific options \n')
self.addCleanup(shutil.rmtree, '/tmp/qubes-test')
vm.kernel = 'dummy'
libvirt_xml = vm.create_config_file()
Expand Down

0 comments on commit 5db7af0

Please sign in to comment.