mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Python: Adjust XXE PoC for newer lxml versions
Which doesn't raise that syntax error (at least not on my laptop)
This commit is contained in:
committed by
Rasmus Wriedt Larsen
parent
91795b8577
commit
a1d88e39a7
@@ -361,11 +361,7 @@ class TestLxml:
|
||||
hit_xxe = False
|
||||
|
||||
parser = lxml.etree.XMLParser()
|
||||
try:
|
||||
root = lxml.etree.fromstring(remote_xxe, parser=parser)
|
||||
assert False
|
||||
except lxml.etree.XMLSyntaxError as e:
|
||||
assert "Failure to process entity remote_xxe" in str(e)
|
||||
root = lxml.etree.fromstring(remote_xxe, parser=parser)
|
||||
assert hit_xxe == False
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user