Skip to content

Commit

Permalink
WebAdmin SMTP: ensure current config is not nil
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Oct 15, 2024
1 parent 87fdc1d commit 7d24a48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/httpd/webadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4316,6 +4316,9 @@ func (s *httpdServer) handleOAuth2TokenRedirect(w http.ResponseWriter, r *http.R
}

func updateSMTPSecrets(newConfigs, currentConfigs *dataprovider.SMTPConfigs) {
if currentConfigs == nil {
currentConfigs = &dataprovider.SMTPConfigs{}
}
if newConfigs.Password.IsNotPlainAndNotEmpty() {
newConfigs.Password = currentConfigs.Password
}
Expand Down

0 comments on commit 7d24a48

Please sign in to comment.