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

XMLISVALID accepts malformed comments: "<!-->" and "--" inside a comment

    XMLWordPrintable

Details

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

    Description

      {{<!-->}} 

      is parsed as a complete comment, and - inside a comment is accepted. Neither is well-formed XML. The comment parsing is in strings/xml.c and is the same in 10.11: ExtractValue('<r>a<!->b</r>','/r') returns a b there as well.

      SET @s= '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="r" type="xs:string"/></xs:schema>';
      --echo # BUG if 1
      SELECT XMLISVALID('<r>a<!-->b</r>', @s), XMLISVALID('<r><!-- a -- b --></r>', @s);
      

      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.