Skip to content

Commit

Permalink
Fix error in email formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkst-quinn committed Feb 14, 2025
1 parent c439d4f commit d58c3de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion canarytokens/channel_output_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@ def format_report_intro(details: TokenAlertDetails):
else:
intro = f"{article} {readable_type} Canarytoken has been triggered."

if details.additional_data["src_port"]:
if (
"src_port" in details.additional_data
and details.additional_data["src_port"]
):
intro = dedent(f"from Source Port {details.additional_data['src_port']}")

if details.channel == "DNS": # TODO: make channel an enum.
Expand Down

0 comments on commit d58c3de

Please sign in to comment.