Skip to content

Commit

Permalink
fix: verify hostname during STARTTLS correctly (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Apr 12, 2024
1 parent 94dbc53 commit 5bf4a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/notifications/stdlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func sendMail( //nolint:funlen,cyclop
return err //nolint:wrapcheck
}
if ok, _ := c.Extension("STARTTLS"); ok {
config := &tls.Config{ServerName: addr} //nolint:gosec,exhaustruct
config := &tls.Config{ServerName: host} //nolint:gosec,exhaustruct
if err = c.StartTLS(config); err != nil {
return err //nolint:wrapcheck
}
Expand Down

0 comments on commit 5bf4a95

Please sign in to comment.