From 42456d23b20e99d0cb82408b4533d2083a5901c5 Mon Sep 17 00:00:00 2001 From: Hamza El-Saawy Date: Thu, 17 Mar 2022 16:09:29 -0400 Subject: [PATCH] scrubbing bugfix: incorrect return variable Signed-off-by: Hamza El-Saawy --- internal/log/scrub.go | 2 +- test/vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/log/scrub.go b/internal/log/scrub.go index b906a16bb4..d51e0fd89f 100644 --- a/internal/log/scrub.go +++ b/internal/log/scrub.go @@ -60,7 +60,7 @@ func ScrubProcessParameters(s string) (string, error) { if err := encode(buf, pp); err != nil { return "", err } - return strings.TrimSpace(s), nil + return strings.TrimSpace(buf.String()), nil } // ScrubBridgeCreate scrubs requests sent over the bridge of type diff --git a/test/vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go b/test/vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go index b906a16bb4..d51e0fd89f 100644 --- a/test/vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go +++ b/test/vendor/github.com/Microsoft/hcsshim/internal/log/scrub.go @@ -60,7 +60,7 @@ func ScrubProcessParameters(s string) (string, error) { if err := encode(buf, pp); err != nil { return "", err } - return strings.TrimSpace(s), nil + return strings.TrimSpace(buf.String()), nil } // ScrubBridgeCreate scrubs requests sent over the bridge of type