mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 15:28:05 +03:00
WebAdmin SMTP: ensure current config is not nil
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -4316,6 +4316,9 @@ func (s *httpdServer) handleOAuth2TokenRedirect(w http.ResponseWriter, r *http.R
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateSMTPSecrets(newConfigs, currentConfigs *dataprovider.SMTPConfigs) {
|
func updateSMTPSecrets(newConfigs, currentConfigs *dataprovider.SMTPConfigs) {
|
||||||
|
if currentConfigs == nil {
|
||||||
|
currentConfigs = &dataprovider.SMTPConfigs{}
|
||||||
|
}
|
||||||
if newConfigs.Password.IsNotPlainAndNotEmpty() {
|
if newConfigs.Password.IsNotPlainAndNotEmpty() {
|
||||||
newConfigs.Password = currentConfigs.Password
|
newConfigs.Password = currentConfigs.Password
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user