Skip to content

Commit 1658ce6

Browse files
author
jmccormick2001
committed
update runpsql to only show 20 chars from the output to avoid showing passwords
1 parent 730778c commit 1658ce6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

util/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func PatchClusterCRD(restclient *rest.RESTClient, labelMap map[string]string, ol
285285
// RunPsql runs a psql statement
286286
func RunPsql(password string, hostip string, sqlstring string) {
287287

288-
log.Debug("RunPsql password [" + password + "] hostip=[" + hostip + "] sql=[" + sqlstring + "]")
288+
log.Debug("RunPsql hostip=[" + hostip + "] sql=[" + sqlstring + "]")
289289
cmd := exec.Command("runpsql.sh", password, hostip)
290290

291291
cmd.Stdin = strings.NewReader(sqlstring)
@@ -302,7 +302,7 @@ func RunPsql(password string, hostip string, sqlstring string) {
302302
return
303303
}
304304

305-
log.Debugf("runpsql output [%s]\n", out.String())
305+
log.Debugf("runpsql output [%s]\n", out.String()[0:20])
306306
}
307307

308308
// GetSecretPassword ...

0 commit comments

Comments
 (0)