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

Incorrect pattern processing in "Expression" field in the create trigger wizard

    XMLWordPrintable

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 4.0.31rc1, 5.0.11rc1, 5.2.7rc1, 5.4.0beta3
    • None
    • Frontend (F)

    Description

      Problem description: There are a couple of issues with pattern parameter processing when creating a trigger through the "Create trigger" wizard in the list of items:
      1 - if the pattern contains round brackets, then everything that is placed after the closing bracket is lost.
      2 - if the pattern contains quotes (single, double) the quotes are not escaped. As result, if there is text after the quotes an error is retrieved when attempting to save the expression. Furthermore the pattern itself is not put into double quotes

      Example:

      Steps to reproduce:

      1. Create a host with an item with data type set to Log or Text
      2. Open the trigger creation wizard from the items list
      3. Enter a trigger name
      4. in the expression field write down an epression that contains opening+closing double quotes and text after them, for example: "abc" abc
      5. Add the expression and attempt to save the trigger
        Result 1: the double quotes are not escaped, as result the following error is returned:
        Incorrect trigger expression. Check expression part starting from "({111_test:trap.regexp("abc" abc)})<>0)".
        No permissions to referred object or it does not exist!
        
      6. change the expression of the trigger to something that contains round brackets, for example: gr(a|e)y jacket
      7. Add the expression and save the trigger.
      8. Open configuration of the trigger
        Result 2: the part of the expression that was placed after the closing bracket is lost.

      Expected:
      1 - string pattern in the expression should be automatically quoted
      2 - if the expression contains double quotes, the escape character should be placed before them
      3 - no part of the pattern should be lost, even if it contains round brackets.

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            solonkins Sergejs Olonkins
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: