We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc4060e commit c777e84Copy full SHA for c777e84
intelmq/lib/harmonization.py
@@ -1160,7 +1160,7 @@ class TLP(UppercaseString):
1160
Accepted for sanitation are different cases and the prefix 'tlp:'.
1161
"""
1162
enum = ['WHITE', 'GREEN', 'AMBER', 'RED']
1163
- prefix_pattern = re.compile(r'^(TLP:?)?\s*', flags=re.IGNORECASE)
+ prefix_pattern = re.compile(r'^(TLP:?)?\s*')
1164
1165
@staticmethod
1166
def is_valid(value: str, sanitize: bool = False) -> bool:
@@ -1180,6 +1180,6 @@ def sanitize(value: str) -> Optional[str]:
1180
value = UppercaseString.sanitize(value)
1181
if value:
1182
value = TLP.prefix_pattern.sub('', value)
1183
- if value.lower() == 'yellow':
+ if value == 'YELLOW':
1184
value = 'AMBER'
1185
return value
0 commit comments