Skip to content

Commit

Permalink
Merge pull request #848 from jan4401/patch-1
Browse files Browse the repository at this point in the history
TheHive4: equal signs instead of colons for tags
  • Loading branch information
dadokkio authored Oct 14, 2020
2 parents 50740dd + 9e51263 commit 8ad6342
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion responders/Mailer/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run(self):
tags = self.get_param(
"data.tags", None, "recipient address not found in tags"
)
mail_tags = [t[5:] for t in tags if t.startswith("mail:")]
mail_tags = [t[5:] for t in tags if t.startswith("mail=") or t.startswith("mail:")]
if mail_tags:
mail_to = mail_tags.pop()
else:
Expand All @@ -51,6 +51,8 @@ def run(self):
descr_array = description.splitlines()
if "mailto:" in descr_array[0]:
mail_to = descr_array[0].replace("mailto:", "").strip()
elif "mailto=" in descr_array[0]:
mail_to = descr_array[0].replace("mailto=", "").strip()
else:
self.error("recipient address not found in description")
# Set rest of description as body
Expand Down

0 comments on commit 8ad6342

Please sign in to comment.