ExportXMLWordPrintable

    • S26-W28/29, S26-W38/39
    • 1

      Steps to reproduce:

      1. Edit zabbix.conf.php
      2. Add invalid parameter, for example:
        $DB['TYPE'] = 'TEST';
        
      3. Open the frontend
      4. Validate that correct error message is displayed
      5. Open /setup.php

      Result:
      Blank page is displayed, error is present in php log:

      Trying to access array offset on null [setup.php:98 -> access_deny() -> CAuthenticationHelper::getPublic() -> CAuthentication::getPublic() -> CConfigFile->{closure:/home/zabbix/workspace/master/ui/conf/zabbix.conf.php:85}() in include/classes/api/services/CAuthentication.php:59]
      TypeError: implode(): Argument #2 ($array) must be of type ?array, false given in /home/zabbix/workspace/master/ui/include/db.inc.php:558
      Stack trace:
      #0 /home/zabbix/workspace/master/ui/include/db.inc.php(558): implode()
      #1 /home/zabbix/workspace/master/ui/include/classes/db/DB.php(1181): dbConditionString()
      #2 /home/zabbix/workspace/master/ui/include/classes/db/DB.php(1067): DB::dbFilter()
      #3 /home/zabbix/workspace/master/ui/include/classes/db/DB.php(983): DB::applyQueryFilterOptions()
      #4 /home/zabbix/workspace/master/ui/include/classes/db/DB.php(860): DB::createSelectQueryParts()
      #5 /home/zabbix/workspace/master/ui/include/classes/api/helpers/CApiSettingsHelper.php(37): DB::makeSql()
      #6 /home/zabbix/workspace/master/ui/include/classes/api/services/CAuthentication.php(60): CApiSettingsHelper::getParameters()
      #7 /home/zabbix/workspace/master/ui/include/classes/helpers/CAuthenticationHelper.php(81): CAuthentication::getPublic()
      #8 /home/zabbix/workspace/master/ui/include/func.inc.php(1460): CAuthenticationHelper::getPublic()
      #9 /home/zabbix/workspace/master/ui/setup.php(98): access_deny()
      #10 {main}
      

      Expected:
      Expected result should be confirmed with PO team:
      Access denied error should be displayed (same as currently displayed, if zabbix.conf.php file exists.) or same error regarding the incorrect parameter in config file.

        1. image (5).png
          24 kB
          Jurijs Zaharovs
        2. master_error_rep.png
          184 kB
          Jurijs Zaharovs

            Assignee:
            Jurijs Zaharovs
            Reporter:
            Nikita Gogolevs
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4h 10m
                4h 10m