Skip to content

Commit

Permalink
fix: escape newline secrets before injection (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 authored Nov 8, 2023
1 parent e728c12 commit 12defde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions executor/linux/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions executor/linux/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 12defde

Please sign in to comment.