You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that xmlsec's lxml integration does not call adoptExternalDocument() to create an lxml wrapper for an internally created libxml2 XML tree. If it wants to pass externally created XML documents into lxml, then it should call it. Simply wrapping an arbitrary libxml2 tree in an lxml Element violates lxml's tree invariants, such as shared usage of an XML name dict. This can lead to misbehaving elements, such as missing results from .find() (see https://bugs.launchpad.net/lxml/+bug/1960668).
It seems that xmlsec's lxml integration does not call adoptExternalDocument() to create an lxml wrapper for an internally created libxml2 XML tree. If it wants to pass externally created XML documents into lxml, then it should call it. Simply wrapping an arbitrary libxml2 tree in an lxml Element violates lxml's tree invariants, such as shared usage of an XML name dict. This can lead to misbehaving elements, such as missing results from
.find()
(see https://bugs.launchpad.net/lxml/+bug/1960668).https://github.com/lxml/lxml/blob/95f8006336889df154c45130db1ec897b424e529/src/lxml/includes/etreepublic.pxd#L64-L65
I admit that this is probably un(der)documented, so not your fault.
The text was updated successfully, but these errors were encountered: