# HG changeset patch # User Thomas Junk # Date 1559306927 -7200 # Node ID efa468653d48dadb0b312e8b03baf12bc533c82b # Parent 869505c5087b85926ffa7dad2027a57a49f3dfc4 only write password attribute, when available previous diff -r 869505c5087b -r efa468653d48 pkg/controllers/importconfig.go --- a/pkg/controllers/importconfig.go Fri May 31 14:32:24 2019 +0200 +++ b/pkg/controllers/importconfig.go Fri May 31 14:48:47 2019 +0200 @@ -102,10 +102,12 @@ // in order to prevent password leakage // When the user changes the import configuration without a new password // the old password should be conserved - oldPasswd := pc.Attributes["password"] + oldPasswd, ok := pc.Attributes["password"] pc.User = session.User pc.Attributes = common.Attributes{} - pc.Attributes["password"] = oldPasswd + if ok == true { + pc.Attributes["password"] = oldPasswd + } pc.Attributes.Marshal(config) // Marshal only overwrites keys present in config cron, newCron := pc.Attributes.Get("cron")