فهرست منبع

Merge pull request #6573 from mheon/ps_cleanup

Escape control and nonprintable characters in docker ps
unclejack 11 سال پیش
والد
کامیت
2ffd13bc31
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      api/client/commands.go

+ 1 - 0
api/client/commands.go

@@ -1511,6 +1511,7 @@ func (cli *DockerCli) CmdPs(args ...string) error {
 				outCommand = out.Get("Command")
 				ports      = engine.NewTable("", 0)
 			)
+			outCommand = strconv.Quote(outCommand)
 			if !*noTrunc {
 				outCommand = utils.Trunc(outCommand, 20)
 			}