diff --git a/stix_shifter_modules/okta/stix_transmission/connector.py b/stix_shifter_modules/okta/stix_transmission/connector.py index f52002e07..513a435dd 100644 --- a/stix_shifter_modules/okta/stix_transmission/connector.py +++ b/stix_shifter_modules/okta/stix_transmission/connector.py @@ -12,7 +12,7 @@ class InvalidMetadataException(Exception): class Connector(BaseJsonSyncConnector): OKTA_MAX_PAGE_SIZE = 1000 - DOMAIN_PATTERN = re.compile(r'^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(\.)?)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$') + DOMAIN_PATTERN = re.compile(r'^(?:(?:[a-z0-9]\.)|(?:[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\.))+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$') def __init__(self, connection, configuration): self.api_client = APIClient(connection, configuration) diff --git a/stix_shifter_modules/vectra/stix_translation/transformers.py b/stix_shifter_modules/vectra/stix_translation/transformers.py index 29c43e5f3..9123e5320 100644 --- a/stix_shifter_modules/vectra/stix_translation/transformers.py +++ b/stix_shifter_modules/vectra/stix_translation/transformers.py @@ -53,8 +53,7 @@ def transform(obj): try: if obj and isinstance(obj, list): ip_pattern = re.compile(r'(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})') - domain_pattern = re.compile(r'^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(\.)?)+[a-z0-9][a-z0-9-]{0,' - r'61}[a-z0-9]$') + domain_pattern = re.compile(r'^(?:(?:[a-z0-9]\.)|(?:[a-z0-9][a-z0-9-]{0,61}[a-z0-9]\.))+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$') for index, row in enumerate(obj): if domain_pattern.search(row): continue