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

Trailing and leading spaces are not removed from several API token related fields in frontend

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.4.0alpha2
    • Frontend (F)

      Problems description: Trailing and leading spaces are not removed from the following fields that are in some way related to API tokens:

      1 - "Expires at" field in the API token create/edit form. Exactly the same type of field is trimmed in other places in frontend, for example in Maintenance configuration form fields "Active since" and "Active till".

      2 - Filter field "Name" in the API tokens list. In other places in frontend trailing and leading spaces are removed from such fields, for example in the "Name" filter field in host/template items list.

       Steps to reproduce problem #1:

      1. Open API token configuration form (in create of edit mode)
      2. fill in all mandatory parameters - make sure that the "Set expiration date and time" option is set
      3. Enter a value with trailing or leading space in "Expires at" field
      4. Submit the form

      Result: An error is displayed, specifying that the time format is not correct.
      Expected: The trailing/leading space should've been removed automatically and token configuration should've been successfully saved.

      Steps to reproduce problem #2:

      1. Create a couple of API tokens
      2. Open the list of API tokens
      3. Specify the name of one of the tokens in filter field "Name" - make sure to add trailing and leading spaces to this value.
      4. Apply the filter

      Result: Filter is applied, value in field "Name" still has trailing and leading spaces, no entries are returned in the list of API tokens.
      Expected: Trailing and leading spaces should've been automatically removed from the value in filter field "Name" before applying the filter. At least 1 entry should be returned in the list of API tokens.

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

              Created:
              Updated: