Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1d88e3

Browse files
committed
Python: Adjust XXE PoC for newer lxml versions
Which doesn't raise that syntax error (at least not on my laptop)
1 parent 91795b8 commit a1d88e3

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • python/ql/test/experimental/library-tests/frameworks/XML/poc

python/ql/test/experimental/library-tests/frameworks/XML/poc/PoC.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,7 @@ def test_remote_xxe_disabled_by_default():
361361
hit_xxe = False
362362

363363
parser = lxml.etree.XMLParser()
364-
try:
365-
root = lxml.etree.fromstring(remote_xxe, parser=parser)
366-
assert False
367-
except lxml.etree.XMLSyntaxError as e:
368-
assert "Failure to process entity remote_xxe" in str(e)
364+
root = lxml.etree.fromstring(remote_xxe, parser=parser)
369365
assert hit_xxe == False
370366

371367
@staticmethod

0 commit comments

Comments
 (0)