From 42c4803376e2f6792ae33bbd4fab2fe4b23331b3 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 23 Jun 2022 15:56:41 +0200 Subject: [PATCH] Island: Use schema.loads in AgentConfiguration POST method --- monkey/monkey_island/cc/resources/agent_configuration.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/resources/agent_configuration.py b/monkey/monkey_island/cc/resources/agent_configuration.py index ed0258471..f0ad73cb8 100644 --- a/monkey/monkey_island/cc/resources/agent_configuration.py +++ b/monkey/monkey_island/cc/resources/agent_configuration.py @@ -26,9 +26,7 @@ class AgentConfiguration(AbstractResource): def post(self): try: - request_contents = json.loads(request.data) - - configuration_object = self._schema.load(request_contents) + configuration_object = self._schema.loads(request.data) self._agent_configuration_repository.store_configuration(configuration_object) return make_response({}, 200) except (marshmallow.exceptions.ValidationError, json.JSONDecodeError) as err: