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

API method "script.execute" fails if authorized by token

XMLWordPrintable

    • Sprint 102 (Jul 2023), Sprint 103 (Aug 2023)
    • 0.5

      Steps to reproduce:

      1. Create API token
      2. Create script
      3. Execute API method 'script.execute' on some host

      Result:
      **

      Error in nginx logs on server:

      2023/03/30 01:43:21 [error] 818#818: *588901 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "sessionid" in /usr/share/zabbix/include/classes/api/services/CScript.php on line 941PHP message: PHP Fatal error:  Uncaught TypeError: CZabbixServer::executeScript(): Argument #2 ($sid) must be of type string, null given, called in /usr/share/zabbix/include/classes/api/services/CScript.php on line 943 and defined in /usr/share/zabbix/include/classes/server/CZabbixServer.php:153
      Stack trace:
      #0 /usr/share/zabbix/include/classes/api/services/CScript.php(943): CZabbixServer->executeScript()
      #1 /usr/share/zabbix/include/classes/api/clients/CLocalApiClient.php(121): CScript->execute()
      #2 /usr/share/zabbix/include/classes/core/CJsonRpc.php(75): CLocalApiClient->callMethod()
      #3 /usr/share/zabbix/api_jsonrpc.php(63): CJsonRpc->execute()
      #4 {main} 

      Expected:
      Expected successful execution.

            epulke Elina Pulke
            realmfoo Konstantin
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: