[issue36685] C implementation of xml.etree.ElementTree does not make a copy of attrib argument when creating new Element

Stefan Behnel report at bugs.python.org
Sun Apr 21 02:23:34 EDT 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

Instead of always copying the dict in create_new_element(), we should make sure that all code that calls that function (directly or indirectly) does so with a safely owned dict. If that means that we need to add dict copying in some other place, then that's what's needed to fix this bug.

The best fix is to make the copy close to the user input, where we know what we received and how we will continue to use it.

----------

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


More information about the Python-bugs-list mailing list