From fca4f619b50ac21a40366d5eb57f2c14299c1b71 Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Wed, 30 Jan 2019 14:53:14 +1300 Subject: [PATCH] fix(api): re-use previous password when ldap settings update use empty password (#2659) --- api/http/handler/settings/settings_update.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/http/handler/settings/settings_update.go b/api/http/handler/settings/settings_update.go index 5b4d33ae3..5c68fca94 100644 --- a/api/http/handler/settings/settings_update.go +++ b/api/http/handler/settings/settings_update.go @@ -66,7 +66,12 @@ func (handler *Handler) settingsUpdate(w http.ResponseWriter, r *http.Request) * } if payload.LDAPSettings != nil { + ldapPassword := settings.LDAPSettings.Password + if payload.LDAPSettings.Password != "" { + ldapPassword = payload.LDAPSettings.Password + } settings.LDAPSettings = *payload.LDAPSettings + settings.LDAPSettings.Password = ldapPassword } if payload.AllowBindMountsForRegularUsers != nil {