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

Potential "Undefined index" on trigger expression test form

XMLWordPrintable

    • Sprint 3, Sprint 4, Sprint 5, Sprint 6, Sprint 7, Sprint 8, Sprint 9, Sprint 10, Sprint 11, Sprint 12, Sprint 13, Sprint 14, Sprint 15, Sprint 16
    • 0.75

      Thanks to Cory Marsh for pointing to this issue.

      It is possible to receive php errors on the trigger expressions test page:

      Parse error: syntax error, unexpected '{' in include/triggers.inc.php(2257) : eval()'d code on line 1
      
          Undefined variable: result [tr_testexpr.php:147 ? evalExpressionData() in include/triggers.inc.php:2259]
          Undefined variable: result [tr_testexpr.php:167 ? evalExpressionData() in include/triggers.inc.php:2259]
      

      How to reproduce:

      • open trigger expression test page with trigger function like {Zabbix server:agent.hostname.last()} (the value type of the item should be character, text or log)
      • enter value
        {#DEF}*{hostname:mysql.primary_master.last($g=[`echo 41 > /tmp/h2.txt`];}#)}
      • press [Test] button

      Possible solutions:

      1. to forbid character data for all value types
      2. to rewrite trigger expression evaluation algorythm without using eval() function

        1. result-types-now.png
          45 kB
          Alexander Vladishev
        2. result-type-valid.png
          46 kB
          Alexander Vladishev
        3. triggers.host.xml
          24 kB
          Gregory Chalenko

            gcalenko Gregory Chalenko
            sasha Alexander Vladishev
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: