fix(api): redact device encryption passwords in support bundle config (#10359)
* fix(api): redact device encryption passwords in support bundle config Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl> * Update lib/api/support_bundle.go Signed-off-by: Jakob Borg <jakob@kastelo.net> --------- Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl> Signed-off-by: Jakob Borg <jakob@kastelo.net> Co-authored-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
co-authored by
Jakob Borg
parent
42db6280e6
commit
9e262d84de
@@ -23,6 +23,15 @@ func getRedactedConfig(s *service) config.Configuration {
|
|||||||
if rawConf.GUI.User != "" {
|
if rawConf.GUI.User != "" {
|
||||||
rawConf.GUI.User = "REDACTED"
|
rawConf.GUI.User = "REDACTED"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for folderIdx, folderCfg := range rawConf.Folders {
|
||||||
|
for deviceIdx, deviceCfg := range folderCfg.Devices {
|
||||||
|
if deviceCfg.EncryptionPassword != "" {
|
||||||
|
rawConf.Folders[folderIdx].Devices[deviceIdx].EncryptionPassword = "REDACTED"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return rawConf
|
return rawConf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user