mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-17239: Disable external entities in SAX parser (GH-9217)
The SAX parser no longer processes general external entities by default to increase security. Before, the parser created network connections to fetch remote files or loaded local files from the file system for DTD and entities. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue17239
This commit is contained in:
parent
9fb051f032
commit
17b1d5d4e3
9 changed files with 120 additions and 5 deletions
|
@ -95,7 +95,7 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
|
|||
self._lex_handler_prop = None
|
||||
self._parsing = 0
|
||||
self._entity_stack = []
|
||||
self._external_ges = 1
|
||||
self._external_ges = 0
|
||||
self._interning = None
|
||||
|
||||
# XMLReader methods
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue