You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[(type-a:a=1 OR type-b:b=2) AND (type-a:a=2 OR type-b:b=1)]
is okay, but
[type-a:a=1 AND (type-a:a=2 OR type-b:b=1)]
is not:
>>> stix2.pattern_visitor.create_pattern_object("[type-a:a=1 AND (type-a:a=2 OR type-b:b=1)]", version="2.1")
<start of long stacktrace omitted>
File "C:\Programming\python\stix\cti-python-stix2\stix2\patterns.py", line 534, in __init__
super(AndBooleanExpression, self).__init__("AND", operands)
File "C:\Programming\python\stix\cti-python-stix2\stix2\patterns.py", line 514, in __init__
raise ValueError("All operands to an 'AND' expression must have the same object type")
ValueError: All operands to an 'AND' expression must have the same object type
The latter pattern simply drops a disjunct from the first 'OR' from the first pattern. If the first is okay, the second should be too. Another example is:
[(type-a:a=1 OR type-a:b=2) AND (type-a:a=2 OR type-b:b=1)]
This one simply changes the type of the second comparison in the first 'OR' to 'type-a', so that both types in that 'OR' are the same. If the first example is okay, this one should be too.
The text was updated successfully, but these errors were encountered:
For example,
is okay, but
is not:
The latter pattern simply drops a disjunct from the first 'OR' from the first pattern. If the first is okay, the second should be too. Another example is:
This one simply changes the type of the second comparison in the first 'OR' to 'type-a', so that both types in that 'OR' are the same. If the first example is okay, this one should be too.
The text was updated successfully, but these errors were encountered: