diff options
author | Jhon Honce <jhonce@redhat.com> | 2021-10-11 09:11:32 -0700 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2021-10-19 15:56:35 -0400 |
commit | 8b87793d4878026d5d4f734409f33fe873160115 (patch) | |
tree | ed04c76c435a00ae735eb34bd166c690ec30a7e1 /pkg | |
parent | d458bc304d6c4ac58e5ba5857d6916738f326d4c (diff) | |
download | podman-8b87793d4878026d5d4f734409f33fe873160115.tar.gz podman-8b87793d4878026d5d4f734409f33fe873160115.tar.bz2 podman-8b87793d4878026d5d4f734409f33fe873160115.zip |
Use SplitN(2) when copying env variables
Environment variables whose value contained an equal sign where
truncated
Fixes #11891
Signed-off-by: Jhon Honce <jhonce@redhat.com>
<MH: Fixed cherry-pick conflicts>
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/kube/kube.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go index 27a1e5a72..7072a5821 100644 --- a/pkg/specgen/generate/kube/kube.go +++ b/pkg/specgen/generate/kube/kube.go @@ -254,7 +254,7 @@ func ToSpecGen(ctx context.Context, opts *CtrSpecGenOptions) (*specgen.SpecGener // Environment Variables envs := map[string]string{} for _, env := range imageData.Config.Env { - keyval := strings.Split(env, "=") + keyval := strings.SplitN(env, "=", 2) envs[keyval[0]] = keyval[1] } |