Delimiting newline character is passed in media script parameter

XMLWordPrintable

    • Type: Problem report
    • Resolution: Won't fix
    • Priority: Minor
    • None
    • Affects Version/s: 3.0.11rc1, 3.2.8rc1, 3.4.2rc1, 4.0.0alpha1
    • Component/s: Server (S)

      Original specification of ZBXNEXT-2163 says:

      The parameters are stored in media_type table exec_params field separated by newline character.

      "Separated" means that newline character is not part of parameter (and this is how it is displayed in the frontend).

      Problematic piece of code in src/zabbix_server/alerter.c:

      for (pstart = mediatype->exec_params; NULL != (pend = strchr(pstart, '\n')); pstart = pend + 1)
      {
      	char	*param_esc;
      
      	param_offset = 0;
      
      	zbx_strncpy_alloc(&param, &param_alloc, &param_offset, pstart, pend - pstart);
      

            Assignee:
            Unassigned
            Reporter:
            Glebs Ivanovskis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: