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

Spaces in stack name causes mislabelling #393

Closed
jardon opened this issue Aug 21, 2024 · 0 comments · Fixed by #394
Closed

Spaces in stack name causes mislabelling #393

jardon opened this issue Aug 21, 2024 · 0 comments · Fixed by #394

Comments

@jardon
Copy link
Member

jardon commented Aug 21, 2024

Spaces in the name of the stack (ie. "ubuntu jammy") cause a mislabelling of the resulting container during creation. This takes the second part of the name (after the first space) and dumps it into the distrobox command which then forwards it to the container engine. The result is that the container engine (in this case podman) interprets the part after the space as the image name.

Example:
--label=stack=ubuntu jammy is read as --label=key=value <image-name> which then checks for an image in docker.io/library/jammy:latest

Since there is no input validation, spaces are allowed but not accounted for. The problematic code is found here as it wrecklessly throws the stack name in as a label.

jardon added a commit to jardon/apx that referenced this issue Aug 21, 2024
replace stack name spaces with dashes
jardon added a commit to jardon/apx that referenced this issue Aug 22, 2024
escape spaces when creating labels
jardon added a commit to jardon/apx that referenced this issue Aug 22, 2024
escape spaces when creating labels
jardon added a commit that referenced this issue Aug 22, 2024
fix:[close #393] escape spaces when creating labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant