mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-22 16:01:43 -04:00
apply logSecretFilter to output from ui.Say
This commit is contained in:
@@ -236,6 +236,13 @@ func (rw *BasicUi) Say(message string) {
|
||||
rw.l.Lock()
|
||||
defer rw.l.Unlock()
|
||||
|
||||
// Use LogSecretFilter to scrub out sensitive variables
|
||||
for s := range LogSecretFilter.s {
|
||||
if s != "" {
|
||||
message = strings.Replace(message, s, "<sensitive>", -1)
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("ui: %s", message)
|
||||
_, err := fmt.Fprint(rw.Writer, message+"\n")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user