-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
xml.sax.saxutils.XMLGenerator does not escape the namespace URI #156797
Copy link
Copy link
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixestopic-XMLtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixestopic-XMLtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
XMLGeneratorwrites namespace declarations with the URI inserted as is. It is the only attribute value in this class which is not written withquoteattr(), so a URI containing&,<or a quote character produces a document which cannot be parsed. Copying a document with such a namespace name is enough to break it.Output:
Parsing it back fails with "not well-formed (invalid token)". The same happens for
<and for a quote character in the URI.Linked PRs