[BUG]: Creating a new agent binary leads to network error
Version Information
0.14.4
Hashcat
6.2.6
Description
Creating a new agent binary leads to network error
The full error that is thown is the following:
{ "title": "Required parameter(s) 'type' not specified", "type": "about:blank", "status": 400 }
The reason this happens, is that the new UI doesnt send the 'type' of the agent binary. This should be added
This is a server issue.
The problem is that the agentBinary object contains "type" as business logic attribute and the json:api serializer handles it as json:api resource type leading to the object not having the "type" attribute after serialization.
According to json:api standard, both "id" and "type" are not allowed as business logic attributes, see https://jsonapi.org/format/#document-resource-object-fields
Suggestion: Rename the type attribute to something like e.g. "binaryType" server-side
The UI must also be adapted after the server change, because @gpascal123 has already added a workaround for the deserialization in agent-binaries.datasource.ts line 27-30 renaming the attribute.
@cv5ch in pull request #1455 this is adressed and the attribute is now called binaryType. Can you alter the front end to this type and then merge the pull request?
@jessevz fixed also in frontend by pull request hashtopolis/web-ui#353