From cb97e021a77ff2e43542c775172d7ab64dc73d9a Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 27 Jul 2022 16:02:05 +0530 Subject: [PATCH] Common: Add port number validation to TCPScanConfigurationSchema --- .../agent_configuration/agent_sub_configuration_schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py index 3c46cd0fe..a541a8aac 100644 --- a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py +++ b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py @@ -94,7 +94,7 @@ class ICMPScanConfigurationSchema(Schema): class TCPScanConfigurationSchema(Schema): timeout = fields.Float() - ports = fields.List(fields.Int()) + ports = fields.List(fields.Int(validate=validate.Range(min=0, max=65535))) @post_load @freeze_lists