mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
Split auth on first colon
Upstream-commit: a37b155384401e8b2bed635251440b0feb6bcdbc Component: engine
This commit is contained in:
@@ -63,7 +63,7 @@ func decodeAuth(authStr string) (string, string, error) {
|
||||
if n > decLen {
|
||||
return "", "", fmt.Errorf("Something went wrong decoding auth config")
|
||||
}
|
||||
arr := strings.Split(string(decoded), ":")
|
||||
arr := strings.SplitN(string(decoded), ":", 2)
|
||||
if len(arr) != 2 {
|
||||
return "", "", fmt.Errorf("Invalid auth configuration file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user