server icon indicating copy to clipboard operation
server copied to clipboard

[BUG]: Web-UI: Disabling Agent assignment throws error

Open gluafamichl opened this issue 8 months ago • 0 comments

Version Information

0.14.4 Dev branch

Hashcat

No response

Description

  • Go to agent detail page in new Web UI
  • In Assignment dropdown select "Disabled"
  • Update

This will POST the following request:

/api/v2/ui/agentassignments

{"data":{"type":"AgentAssignments","attributes":{"taskId":"null","agentId":1}}}

Which leads to this error:

{
    "message": "Slim Application Error",
    "exception": [
        {
            "type": "Middlewares\\Utils\\HttpErrorException",
            "code": 0,
            "message": "Key 'taskId' is not of type integer",
            "file": "/var/www/html/src/inc/apiv2/common/AbstractBaseAPI.class.php",
            "line": 762
        }
    ]
}

Not sure, if sending null for taskId from frontend is the correct way to disable the assignment.

gluafamichl avatar Apr 15 '25 09:04 gluafamichl