From e260dbb7164e62b2cbef81f94d35177754ce96f5 Mon Sep 17 00:00:00 2001 From: "Desai, Kartikey H" Date: Wed, 18 Dec 2019 11:24:00 -0500 Subject: [PATCH] Fixes #309 --- stix2/v21/observables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stix2/v21/observables.py b/stix2/v21/observables.py index 186ed9e..6f53255 100644 --- a/stix2/v21/observables.py +++ b/stix2/v21/observables.py @@ -598,9 +598,9 @@ class SocketExt(_Extension): options = self.get('options') if options is not None: - acceptable_prefixes = ["SO", "ICMP", "ICMP6", "IP", "IPV6", "MCAST", "TCP", "IRLMP"] + acceptable_prefixes = ["SO_", "ICMP_", "ICMP6_", "IP_", "IPV6_", "MCAST_", "TCP_", "IRLMP_"] for key, val in options.items(): - if key[:key.find('_')] not in acceptable_prefixes: + if key[:key.find('_') + 1] not in acceptable_prefixes: raise ValueError("Incorrect options key") if not isinstance(val, int): raise ValueError("Options value must be an integer")