Skip to content

Commit b485065

Browse files
authored
fix: quote docker login username (#578)
1 parent feb9fcf commit b485065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/configurer/linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func (c LinuxConfigurer) AuthorizeDocker(h os.Host) error {
202202

203203
// AuthenticateDocker performs a docker login on the host.
204204
func (c LinuxConfigurer) AuthenticateDocker(h os.Host, user, pass, imageRepo string) error {
205-
if err := h.Exec(c.DockerCommandf("login -u %s --password-stdin %s", user, imageRepo), exec.Stdin(pass), exec.RedactString(user, pass)); err != nil {
205+
if err := h.Exec(c.DockerCommandf("login -u %s --password-stdin %s", escape.Quote(user), imageRepo), exec.Stdin(pass), exec.RedactString(user, pass)); err != nil {
206206
return fmt.Errorf("failed to login to the docker registry: %w", err)
207207
}
208208
return nil

0 commit comments

Comments
 (0)