mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
logs: redact plugin arguments
may contain sensitive data Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -29,6 +29,11 @@ type HCLogAdapter struct {
|
||||
|
||||
// Log emits a message and key/value pairs at a provided log level
|
||||
func (l *HCLogAdapter) Log(level hclog.Level, msg string, args ...any) {
|
||||
// Workaround to avoid logging plugin arguments that may contain sensitive data.
|
||||
// Check everytime we update go-plugin library.
|
||||
if msg == "starting plugin" {
|
||||
return
|
||||
}
|
||||
var ev *zerolog.Event
|
||||
switch level {
|
||||
case hclog.Info:
|
||||
|
||||
Reference in New Issue
Block a user