Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if SMTP credentials are nil #1006

Merged
merged 2 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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