From d4cecd6f5125634d24ecbe4bcda596190ea6aef3 Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Thu, 28 May 2020 17:08:40 -0400 Subject: [PATCH] In remove_custom_stix(), when creating the new version, use allow_custom=False to force custom properties to be disallowed. This is extra insurance against a custom prop accidentally getting through. --- stix2/versioning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stix2/versioning.py b/stix2/versioning.py index 7ec7250..da3d0b2 100644 --- a/stix2/versioning.py +++ b/stix2/versioning.py @@ -255,7 +255,7 @@ def remove_custom_stix(stix_obj): # add to set the custom properties we want to get rid of (with their value=None) props.extend(custom_props) - new_obj = new_version(stix_obj, **(dict(props))) + new_obj = new_version(stix_obj, allow_custom=False, **(dict(props))) return new_obj