Skip to content

Commit

Permalink
Check if SMTP credentials are nil (#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 authored Jul 27, 2020
1 parent b46288b commit 9ce79f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/smtp-credentials-nil
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Check if SMTP credentials are nil

Check if SMTP credentials are nil before passing them to the
SMTPClient, causing it to crash.

https://github.com/cs3org/reva/pull/1006
4 changes: 3 additions & 1 deletion internal/http/services/ocmd/invites.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ type invitesHandler struct {

func (h *invitesHandler) init(c *Config) {
h.gatewayAddr = c.GatewaySvc
h.smtpCredentials = smtpclient.NewSMTPCredentials(c.SMTPCredentials)
if c.SMTPCredentials != nil {
h.smtpCredentials = smtpclient.NewSMTPCredentials(c.SMTPCredentials)
}
h.meshDirectoryURL = c.MeshDirectoryURL
}

Expand Down

0 comments on commit 9ce79f5

Please sign in to comment.