Skip to content

Commit

Permalink
Patch: Merge pull request #42 from reflexivesecurity/fix_bad_subject_…
Browse files Browse the repository at this point in the history
…regex

Patch - Fix bad regex cutting out numbers from subject line
  • Loading branch information
rjulian committed Sep 28, 2020
2 parents 8f8b531 + 28ed380 commit c1ed9ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reflex_core/aws_rule_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def get_remediation_message_subject(self):
str: The subject to use in notifications.
"""
subject = self.__class__.__name__
subject_split = re.findall(r"[A-Z](?:[a-z]+|[A-Z]*(?=[A-Z]|$))", subject)
subject_split = re.findall(r"[0-9A-Z](?:[0-9a-z]+|[0-9A-Z]*(?=[0-9A-Z]|$))", subject)
fixed_subject = " ".join(subject_split)
return f"The Reflex Rule {fixed_subject} was triggered."

Expand Down

0 comments on commit c1ed9ca

Please sign in to comment.