Skip to content

Commit

Permalink
fix(email): do not load local image resources if src tag is an absolu…
Browse files Browse the repository at this point in the history
…te http url

closes gravitee-io/issues#1972
  • Loading branch information
tcompiegne authored and aelamrani committed Feb 25, 2019
1 parent a3505f5 commit a0c018c
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -166,6 +166,7 @@ private void addContentInMessage(final MailMessage mailMessage, final String htm

final List<String> resources = imageElements.stream()
.filter(imageElement -> imageElement.hasAttr("src"))
.filter(imageElement -> !imageElement.attr("src").startsWith("http"))
.map(imageElement -> {
final String src = imageElement.attr("src");
imageElement.attr("src", "cid:" + src);
Expand Down

0 comments on commit a0c018c

Please sign in to comment.