From 15acc9d9ad1dbe0613036dc84b314dfe22bbc1be Mon Sep 17 00:00:00 2001 From: clavedeluna Date: Mon, 26 Feb 2024 08:58:48 -0300 Subject: [PATCH] testing sonarcloud xml --- tests/samples/use_defusedxml.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/samples/use_defusedxml.py b/tests/samples/use_defusedxml.py index fb864488..2f1c8142 100644 --- a/tests/samples/use_defusedxml.py +++ b/tests/samples/use_defusedxml.py @@ -1,5 +1,7 @@ -from io import StringIO -from xml.etree import ElementTree, ElementInclude # pylint: disable=unused-import +import xml.sax -xml = StringIO("Hello XML") -et = ElementTree.parse(xml) +parser = xml.sax.make_parser() +# myHandler = MyHandler() +# parser.setContentHandler(myHandler) +# parser.setFeature(feature_external_ges, True) # Noncompliant +parser.parse('xxe.xml')