[New-bugs-announce] [issue35013] Add more type checks for children of xml.etree.ElementTree.Element

Serhiy Storchaka report at bugs.python.org
Thu Oct 18 02:56:21 EDT 2018


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Currently some methods for xml.etree.ElementTree.Element check the type subelements: append(), extend(), insert(). But there are other ways to add non-Element children: __setitem__(), __setstate__(), __deepcopy__(). This could cause crashes later in the C code and required to add numerous type checks for iterating and searching. Since the intention was to prevent adding non-Element children, it is better to check the type every time when add new children.

----------
assignee: serhiy.storchaka
components: Library (Lib), XML
messages: 327939
nosy: eli.bendersky, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Add more type checks for children of xml.etree.ElementTree.Element
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35013>
_______________________________________


More information about the New-bugs-announce mailing list