diff --git a/stix2/properties.py b/stix2/properties.py index ecdbf18..76fe31b 100644 --- a/stix2/properties.py +++ b/stix2/properties.py @@ -149,9 +149,9 @@ class IDProperty(Property): if not value.startswith(self.required_prefix): raise ValueError("must start with '{0}'.".format(self.required_prefix)) try: - uuid.UUID(value.split('--', 1)[1], version=4) + uuid.UUID(value.split('--', 1)[1]) except Exception: - raise ValueError("must have a valid version 4 UUID after the prefix.") + raise ValueError("must have a valid UUID after the prefix.") return value def default(self): diff --git a/stix2/test/test_properties.py b/stix2/test/test_properties.py index 06172ab..e83b2fc 100644 --- a/stix2/test/test_properties.py +++ b/stix2/test/test_properties.py @@ -86,7 +86,7 @@ def test_id_property(): assert str(excinfo.value) == "must start with 'my-type--'." with pytest.raises(ValueError) as excinfo: idprop.clean('my-type--foo') - assert str(excinfo.value) == "must have a valid version 4 UUID after the prefix." + assert str(excinfo.value) == "must have a valid UUID after the prefix." assert idprop.clean(idprop.default())