summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-10-11 09:11:32 -0700
committerJhon Honce <jhonce@redhat.com>2021-10-11 09:14:27 -0700
commit6b2939884cd774fa70304a2a198e9c572242eda9 (patch)
tree98d8501fa6fadb1364175cc817c2bc6b6695b61c /pkg/specgen
parentea868933e8c014ac52192f397f5dc1c3e8ee375a (diff)
downloadpodman-6b2939884cd774fa70304a2a198e9c572242eda9.tar.gz
podman-6b2939884cd774fa70304a2a198e9c572242eda9.tar.bz2
podman-6b2939884cd774fa70304a2a198e9c572242eda9.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>
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/kube/kube.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/kube/kube.go b/pkg/specgen/generate/kube/kube.go
index e93462008..6eebc6376 100644
--- a/pkg/specgen/generate/kube/kube.go
+++ b/pkg/specgen/generate/kube/kube.go
@@ -257,7 +257,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]
}