Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19763

Contents of CDATA for HTTP item request body type XML is escaped incorrectly

    XMLWordPrintable

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 5.0.14, 5.4.3, 6.0.0alpha1
    • None
    • Frontend (F)
    • Team B

    Description

      According to documentation : "Macros can be used as a text node, attribute or CDATA section. Values from macros are resolved and then escaped automatically in a text node and attribute."

      Here are two examples:
      Example a):

      <text attribute="{$A}">{$B}</text>

      Both macros {$A} and {$B} should be resolved and escaped
      .
      Example b):

      <text attribute="{$A}"><![CDATA[{$B}]]></text>

      Only macro {$A} should be resolved and escaped.

      Currently this is not the case and macro {$B} is also escaped.

      To sum it up: for HTTP agent item types if request body type is XML, then the XML content from Request body should be parsed first and only then macros should be resolved and escaped depending on node type. If node type is CDATA, do not escape the resolved macro value. If node type is text or attribute resolve and escape characters: <, >, &, ", '

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            iivs Ivo Kurzemnieks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: