Skip to content

Commit 81fd8b1

Browse files
Fix masking script credentials
Fix masking script credentials, due to incorrect prefix usage, since script does not use prefix "="
1 parent ed2cb1c commit 81fd8b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cluster/srv_job.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ func (server *ServerMonitor) JobBackupScript() error {
16701670
defer cluster.SetInLogicalBackupState(false)
16711671

16721672
scriptCmd := exec.Command(cluster.Conf.BackupSaveScript, server.Host, server.GetCluster().GetMaster().Host, server.Port, server.GetCluster().GetMaster().Port, cluster.GetDbUser(), cluster.GetDbPass(), cluster.Name)
1673-
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModTask, config.LvlInfo, "Command: %s", strings.Replace(scriptCmd.String(), "="+cluster.GetDbPass(), "=XXXX", 1))
1673+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModTask, config.LvlInfo, "Command: %s", strings.Replace(scriptCmd.String(), cluster.GetDbPass(), "XXXX", -1))
16741674
stdoutIn, _ := scriptCmd.StdoutPipe()
16751675
stderrIn, _ := scriptCmd.StderrPipe()
16761676
scriptCmd.Start()

0 commit comments

Comments
 (0)