diff --git a/changelog/unreleased/smtp-credentials-nil b/changelog/unreleased/smtp-credentials-nil new file mode 100644 index 0000000000..44db254a02 --- /dev/null +++ b/changelog/unreleased/smtp-credentials-nil @@ -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 diff --git a/internal/http/services/ocmd/invites.go b/internal/http/services/ocmd/invites.go index 20cd80170e..d90cdd2646 100644 --- a/internal/http/services/ocmd/invites.go +++ b/internal/http/services/ocmd/invites.go @@ -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 }