Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-42415

XMLISVALID accepts documents that are not well-formed: bad entity references, duplicate attributes

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • N/A
    • 13.3
    • XML Functions
    • None

    Description

      SET @s= '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="a" type="xs:string"/></xs:schema>';
      SET @s2= '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="a"><xs:complexType><xs:attribute name="b" type="xs:string"/></xs:complexType></xs:element></xs:schema>';
      --echo # BUG if 1
      SELECT XMLISVALID('<a>&foo;</a>', @s), XMLISVALID('<a>&</a>', @s), XMLISVALID('<a>&#0;</a>', @s), XMLISVALID('<a b="&amp"/>', @s2);
      --echo # BUG if 1
      SELECT XMLISVALID('<a b="1" b="2"/>', @s2);
      --echo # BUG if 1
      SELECT XMLISVALID(' <?xml version="1.0"?><a/>', @s), XMLISVALID(CONCAT('<a>', _binary X'FF', '</a>'), @s);
      --echo # BUG if 0
      SELECT XMLISVALID('<a xmlns:q="urn:q" b="x"/>', @s2);

      Actual: every BUG if 1 column is 1; the namespace declaration returns 0.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.