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

Incorrect validation rules for 4.4 XML import

XMLWordPrintable

    • Team B
    • Sprint 60 (Jan 2020), Sprint 61 (Feb 2020)
    • 0.25

      Zabbix version 4.4 export introduced constants and arrays. But the validation is done incorrectly.

      Let's say we have 4.2 XML file with strings:

      <tls_connect>4</tls_connect>
      <tls_accept>5</tls_accept>
      

      Importing to 4.2 here's what happens:
      4.2 XML goes through the 4.2 validator validates them as strings. Then it moves to 4.4 convertor. The 4.4 convertor changes the version from 4.2 to 4.4 and changes the stings to arrays. The same as if we would have 4.4 XML. For example:

      <tls_accept>
        <option>NO_ENCRYPTION</option>
        <option>TLS_CERTIFICATE</option>
      </tls_accept>
      

      Here's the problem. The 4.4 validator accepts and validates strings XML_STRING, but in order to validate this array, there is a preprocessor called tlsAcceptConstantPreprocessor(). It changes the array to string. And that is wrong. This also creates problems for the future convertors and validators. See attached image for reference. The 4.4 validator should accept arrays as input.

      Host parameters like tls_accept is just one example. There are possibly more like this. Please check all XML validator preprocessors and parameters and make sure they accept the correct format.

            sasha Alexander Vladishev
            iivs Ivo Kurzemnieks
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: