Skip to content

Commit

Permalink
security: fix CWE-297 - improper validation of certificate with host …
Browse files Browse the repository at this point in the history
…mismatch
  • Loading branch information
bobhageman committed Nov 9, 2023
1 parent 1a6aef3 commit 6d25bd4
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public static void send(String toAddresses, String subject, String body, String
Session session;
if (EmailConfiguration.getInstance().getMailUser().length() > 0) {
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.ssl.checkserveridentity", "true");

session = Session.getInstance(props, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
Expand Down

0 comments on commit 6d25bd4

Please sign in to comment.