From 8221dd39cfb62203d888981ac40dbcd6c69fab81 Mon Sep 17 00:00:00 2001 From: Artur Plysyuk Date: Tue, 1 Sep 2020 00:04:31 +0300 Subject: [PATCH] Fix XSS in email viewer --- lib/bamboo/plug/sent_email_viewer/index.html.eex | 12 ++++++++---- lib/mix/start_sent_email_viewer_task.ex | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/bamboo/plug/sent_email_viewer/index.html.eex b/lib/bamboo/plug/sent_email_viewer/index.html.eex index 9d765833..5ec51434 100644 --- a/lib/bamboo/plug/sent_email_viewer/index.html.eex +++ b/lib/bamboo/plug/sent_email_viewer/index.html.eex @@ -145,18 +145,22 @@ "> - + - + <% end %>
diff --git a/lib/mix/start_sent_email_viewer_task.ex b/lib/mix/start_sent_email_viewer_task.ex index 7f332876..0ccf7bb4 100644 --- a/lib/mix/start_sent_email_viewer_task.ex +++ b/lib/mix/start_sent_email_viewer_task.ex @@ -15,7 +15,7 @@ defmodule Mix.Tasks.Bamboo.StartSentEmailViewer do Bamboo.Email.new_email( from: "me@gmail.com", to: "someone@foo.com", - subject: "#{index} - This is a long subject for testing truncation", + subject: "#{index} - This is a long subject for testing truncation", html_body: """ Check different tag styling @@ -32,7 +32,7 @@ defmodule Mix.Tasks.Bamboo.StartSentEmailViewer do long to see how it expands on to the next line Sincerely, - Me + Me and html tag """ ) |> Bamboo.Mailer.normalize_addresses()