Skip to content

Commit

Permalink
No longer using defusedxml since it is not necessary.
Browse files Browse the repository at this point in the history
- mimicked behaviour from defused into the loader.py
- bumped lxml version to > 4.6.0
  • Loading branch information
klaasjanelzinga authored and mvantellingen committed Apr 11, 2021
1 parent b17e0c2 commit 9ff4b5a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/zeep/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def parse_xml(content: str, transport, base_url=None, settings=None):
if docinfo.doctype:
if settings.forbid_dtd:
raise DTDForbidden(docinfo.doctype, docinfo.system_url, docinfo.public_id)
if settings.forbid_entities:
for dtd in docinfo.internalDTD, docinfo.externalDTD:
if dtd is None:
continue
for entity in dtd.iterentities():
raise EntitiesForbidden(entity.name, entity.content)
if settings.forbid_entities:
for dtd in docinfo.internalDTD, docinfo.externalDTD:
if dtd is None:
continue
for entity in dtd.iterentities():
raise EntitiesForbidden(entity.name, entity.content)


return elementtree
Expand Down

0 comments on commit 9ff4b5a

Please sign in to comment.