Skip to content

Commit

Permalink
testing sonarcloud xml
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Feb 26, 2024
1 parent e51b516 commit 15acc9d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/samples/use_defusedxml.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from io import StringIO
from xml.etree import ElementTree, ElementInclude # pylint: disable=unused-import
import xml.sax

xml = StringIO("<root>Hello XML</root>")
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')

0 comments on commit 15acc9d

Please sign in to comment.