Skip to content

Commit

Permalink
SECURITY-1813
Browse files Browse the repository at this point in the history
  • Loading branch information
alecharp committed Sep 3, 2020
1 parent a652163 commit e1893c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/hudson/tasks/Mailer.java
Expand Up @@ -383,6 +383,9 @@ private static Session createSession(String smtpHost, String smtpPort, boolean u
props.put("mail.smtp.socketFactory.class","javax.net.ssl.SSLSocketFactory");
}
props.put("mail.smtp.socketFactory.fallback", "false");
if (props.getProperty("mail.smtp.ssl.checkserveridentity") == null) {
props.put("mail.smtp.ssl.checkserveridentity", "true");
}
}
if(useTls){
/* This allows the user to override settings by setting system properties and
Expand Down

0 comments on commit e1893c6

Please sign in to comment.