From 8d84bdafe18e6d6f4d1f3a3b93775aaf50f264bc Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 26 Jul 2022 18:13:23 +0530 Subject: [PATCH] Common: Modify filename validation regex in CustomPBAConfigurationSchema to allow empty strings --- .../agent_configuration/agent_sub_configuration_schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py index e3f2fe16a..50593da83 100644 --- a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py +++ b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py @@ -15,8 +15,8 @@ from .agent_sub_configurations import ( ) from .utils import freeze_lists -valid_windows_custom_pba_filename_regex = re.compile(r"^[^<>:\"\\\/|?*]+[^<>:\"\\\/|?* \.]$") -valid_linux_custom_pba_filename_regex = re.compile(r"^[^\\]+$") +valid_windows_custom_pba_filename_regex = re.compile(r"^[^<>:\"\\\/|?*]+[^<>:\"\\\/|?* \.]$|^$") +valid_linux_custom_pba_filename_regex = re.compile(r"^[^\\]+$|^$") class CustomPBAConfigurationSchema(Schema):