From 12defde8b132d7d0413f8381ac0d7519ee3cb424 Mon Sep 17 00:00:00 2001 From: dave vader <48764154+plyr4@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:26:06 -0600 Subject: [PATCH] fix: escape newline secrets before injection (#537) --- executor/linux/build.go | 3 +++ executor/linux/service.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/executor/linux/build.go b/executor/linux/build.go index 5427e0d9..daa319bc 100644 --- a/executor/linux/build.go +++ b/executor/linux/build.go @@ -590,6 +590,9 @@ func (c *client) ExecBuild(ctx context.Context) error { } } + c.Logger.Debug("escaping newlines in secrets") + escapeNewlineSecrets(c.Secrets) + // inject secrets for container err = injectSecrets(_step, c.Secrets) if err != nil { diff --git a/executor/linux/service.go b/executor/linux/service.go index 22ea9260..e64b7c14 100644 --- a/executor/linux/service.go +++ b/executor/linux/service.go @@ -39,6 +39,9 @@ func (c *client) CreateService(ctx context.Context, ctn *pipeline.Container) err return err } + logger.Debug("escaping newlines in secrets") + escapeNewlineSecrets(c.Secrets) + logger.Debug("injecting secrets") // inject secrets for container err = injectSecrets(ctn, c.Secrets)