2.1 removes 3 char limit on dict keys

stix2.1
Trey Darley 2018-06-26 09:22:57 +00:00
parent 6b1da856dd
commit cc58a3a4f4
1 changed files with 1 additions and 3 deletions

View File

@ -241,9 +241,7 @@ class DictionaryProperty(Property):
raise ValueError("The dictionary property must contain a non-empty dictionary")
for k in dictified.keys():
if len(k) < 3:
raise DictionaryKeyError(k, "shorter than 3 characters")
elif len(k) > 256:
if len(k) > 256:
raise DictionaryKeyError(k, "longer than 256 characters")
if not re.match('^[a-zA-Z0-9_-]+$', k):
raise DictionaryKeyError(k, "contains characters other than"