mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
logs: redact plugin arguments
may contain sensitive data Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -636,6 +636,15 @@ func getRedactedGlobalConf() globalConfig {
|
||||
binding.OIDC.ClientSecret = getRedactedPassword(binding.OIDC.ClientSecret)
|
||||
conf.HTTPDConfig.Bindings = append(conf.HTTPDConfig.Bindings, binding)
|
||||
}
|
||||
conf.PluginsConfig = nil
|
||||
for _, plugin := range globalConf.PluginsConfig {
|
||||
var args []string
|
||||
for _, arg := range plugin.Args {
|
||||
args = append(args, getRedactedPassword(arg))
|
||||
}
|
||||
plugin.Args = args
|
||||
conf.PluginsConfig = append(conf.PluginsConfig, plugin)
|
||||
}
|
||||
return conf
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user