From 40eb80bc2c7de51a7019a44cc8e5ce7aeed10fff Mon Sep 17 00:00:00 2001 From: Ryan Deivert Date: Tue, 7 Jul 2020 14:05:12 -0700 Subject: [PATCH] ensuring prefix is a lowercase string --- streamalert_cli/apps/handler.py | 4 ++-- streamalert_cli/config.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/streamalert_cli/apps/handler.py b/streamalert_cli/apps/handler.py index 243c11ae2..b00097a2e 100644 --- a/streamalert_cli/apps/handler.py +++ b/streamalert_cli/apps/handler.py @@ -142,9 +142,9 @@ def _add_default_app_args(app_parser): # Validate the name being used to make sure it does not contain specific characters def _validate_name(val): """Validate acceptable inputs for the name of the function""" - acceptable_chars = ''.join([string.digits, string.ascii_letters, '_-']) + acceptable_chars = ''.join([string.digits, string.ascii_lowercase, '_-']) if not set(str(val)).issubset(acceptable_chars): - raise app_parser.error('Name must contain only letters, numbers, ' + raise app_parser.error('Name must contain only lowercase letters, numbers, ' 'hyphens, or underscores.') return val diff --git a/streamalert_cli/config.py b/streamalert_cli/config.py index 6c353778c..12d732489 100644 --- a/streamalert_cli/config.py +++ b/streamalert_cli/config.py @@ -97,9 +97,9 @@ def set_prefix(self, prefix): LOGGER.error('Invalid prefix type, must be string') return False - acceptable_chars = set([*string.digits, *string.ascii_letters]) + acceptable_chars = set([*string.digits, *string.ascii_lowercase]) if not set(prefix).issubset(acceptable_chars): - LOGGER.error('Prefix must contain only letters and numbers') + LOGGER.error('Prefix must contain only lowercase letters and numbers') return False self.config['global']['account']['prefix'] = prefix