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

It is possible to save an item with "Javascript" preprocessing step where script contains only empty spaces

XMLWordPrintable

    • S25-W22/23

      Problem description: Currently, item form validation does not allow to save an item with preprocessing step "Javascript" that has an empty "Script" field, but if field "Script" contains only empty spaces or only newlines (technically the script is still empty) the form gets successfully submitted.
      Not sure if there is a reason do add a Javascript preprocessing step with only empty spaces in the "Script" field, but, at least to be consistent with Script parameter in Browser item and Script item configuration forms, having only empty spaces or newlines in Script field should not be allowed.

      Steps to reproduce:

      1. Open the list of items for any existing host
      2. Press "Create item" buton
      3. Fill in item key and item name fields
      4. Switch to Preprocessing tab
      5. Add a preprocessing step "Javascript" with only empty spaces or only newlines
      6. Attempt to submit the form

      Result: form successfully submitted. No validation errors observed
      Expected: form should not be submitted. An error stating that field "Script" cannot be empty should be displayed.

            apoga Anna Poga
            solonkins Sergejs Olonkins
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: