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

JSON "null" matches empty string in LLD filters

XMLWordPrintable

    • Sprint 58 (Nov 2019)
    • 0.125

      Suppose we send a JSON like the following to Zabbix server:

      {
          "data": [
              {
                  "{#MACRO}": "macro",
                  "{#FILTER}": null
              }
          ]
      }
      

      If we filter by {#FILTER}, then "null" will be processed like an empty string and will match regular expression "^$". Instead, the filter should fail.

      The reason for the behavior above is that our JSON parser currently parses JSON null as an empty string.

        1. zbx_export_hosts.xml
          7 kB
          Andrejs Tumilovics
        2. ZBX-9146.diff
          4 kB
          Andrejs Tumilovics

            atumilovics Andrejs Tumilovics
            asaveljevs Aleksandrs Saveljevs
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: