Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix in #15242 gets confused by environment variables containing '=' #15836

Closed
dtmdl opened this issue Sep 16, 2022 · 0 comments · Fixed by #15839
Closed

Fix in #15242 gets confused by environment variables containing '=' #15836

dtmdl opened this issue Sep 16, 2022 · 0 comments · Fixed by #15839
Assignees
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@dtmdl
Copy link

dtmdl commented Sep 16, 2022

See #15415 / #15415.

@cdoern Thanks for this, but it seems to get confused by environment variables with '=' in the value:

[vagrant@foreman-vagrant ~]$ podman run --name env_ctr -e ENV_TEST=12=3 alpine printenv ENV_TEST
12=3
[vagrant@foreman-vagrant ~]$ podman container clone env_ctr
8af8ca0674fe2a1ba78992d319210ce1caa46fd0f8fa050b2c1d924aa8c80da6
[vagrant@foreman-vagrant ~]$ podman start -a env_ctr-clone
[vagrant@foreman-vagrant ~]$

I'm guessing this string.Split(entry, "=") should be string.SplitN(entry, "=", 2)

@cdoern cdoern self-assigned this Sep 16, 2022
cdoern added a commit to cdoern/podman that referenced this issue Sep 16, 2022
podman container clone was failing when env variables had multiple `=` in them.
Switch split to splitn

resolves containers#15836

Signed-off-by: Charlie Doern <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants