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

Validation expression template for request parameter validator DB_ID is not completely functional

    XMLWordPrintable

    Details

      Description

      Expression template for DB_ID validator has unnecessary single quotes around first argument to bccomp():

      define('DB_ID',		"({}>=0&&bccomp('{}',\"10000000000000000000\")<0)&&");
      

      When actually used in validation process, it produces following PHP code in function calc_exp2():

      return (($_REQUEST["qqq"]["0"]>=0&&bccomp('$_REQUEST["qqq"]["0"]',"10000000000000000000")<0)) ? 1 : 0;
      

      Expression part with bccomp() in it will always evaluate to true, regardless of value in request.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            kristsk Krists Krigers (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: