Skip to content

Commit

Permalink
Strip \n and \r characters from email subjects to avoid crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Jun 28, 2024
1 parent 85e1b40 commit 5192aeb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tcms/core/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def history_email_for(instance, title):
"pk": instance.pk,
"title": title,
}
# no multi-line email headers
subject = subject.replace("\n", " ").replace("\r", " ")

body = (
_(
Expand Down

0 comments on commit 5192aeb

Please sign in to comment.