diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-20 10:56:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-20 10:56:06 +0100 |
commit | c8436cd870e118a5e0dee6a130c6ea3dc6ceceeb (patch) | |
tree | 37b3f70b171588cb8af32eac294db763bc3eb2d9 /vendor/github.com/fsouza/go-dockerclient/auth.go | |
parent | 846405256b38b11babf05de3a7666ceb81577a72 (diff) | |
parent | 96de762eedd1470dfbe73cf424eea848589268d7 (diff) | |
download | podman-c8436cd870e118a5e0dee6a130c6ea3dc6ceceeb.tar.gz podman-c8436cd870e118a5e0dee6a130c6ea3dc6ceceeb.tar.bz2 podman-c8436cd870e118a5e0dee6a130c6ea3dc6ceceeb.zip |
Merge pull request #5253 from rhatdan/buildah
Update to the latest version of buildah
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/auth.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/auth.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/auth.go b/vendor/github.com/fsouza/go-dockerclient/auth.go index eb1a31716..cae2a020f 100644 --- a/vendor/github.com/fsouza/go-dockerclient/auth.go +++ b/vendor/github.com/fsouza/go-dockerclient/auth.go @@ -30,7 +30,7 @@ type AuthConfiguration struct { ServerAddress string `json:"serveraddress,omitempty"` // IdentityToken can be supplied with the identitytoken response of the AuthCheck call - // see https://godoc.org/github.com/docker/docker/api/types#AuthConfig + // see https://pkg.go.dev/github.com/docker/docker/api/types?tab=doc#AuthConfig // It can be used in place of password not in conjunction with it IdentityToken string `json:"identitytoken,omitempty"` @@ -170,9 +170,14 @@ func authConfigs(confs map[string]dockerConfig) (*AuthConfigurations, error) { if conf.Auth == "" { continue } + + // support both padded and unpadded encoding data, err := base64.StdEncoding.DecodeString(conf.Auth) if err != nil { - return nil, err + data, err = base64.StdEncoding.WithPadding(base64.NoPadding).DecodeString(conf.Auth) + } + if err != nil { + return nil, errors.New("error decoding plaintext credentials") } userpass := strings.SplitN(string(data), ":", 2) |