-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Podman machine wrongfully escapes special characters in proxy env #23277
Comments
I think this might happen because of the use of podman/pkg/machine/proxyenv/env.go Line 45 in e225cae
and/or the use of podman/pkg/machine/proxyenv/env.go Lines 27 to 29 in e225cae
The fmt documentation describes %q as
Unfortunately, safely escaping the proxy strings in this case seems to break them, e.g. when NO_PROXY is a comma-separated list or username/password of HTTP(S)_PROXY contain special characters. I am not very familiar with go and was not yet able to setup a working development environment with podman and test this. Maybe someone with a working environment can have a look at this (@Luap99 possibly?). |
The problem is not the go escaping, |
@Luap99 Could we quote the value, to avoid having to espace it? For example:
instead of:
|
Well that just changes how to escape. If the given input also contains a quote (I know much less likely but still) we still have to take care of it. But yes you are right that might be much easier to do. |
I think simply quoting the value with Right now, Podman is pretty much unusable if you need to have any special characters in your proxy settings - most common case probably being a comma-separated list of domains in NO_PROXY. How was this handled previously? It was not an issue in Podman 4 - maybe that logic could be reused. |
A friendly reminder that this issue had no activity for 30 days. |
@feloy interested in opening a PR? |
@rhatdan Yes, I started to work on a fix today. A PR should come soon |
Issue Description
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
The value of the env is escaped:
no_proxy=localhost\,127.0.0.0/24
Describe the results you expected
Not escaped value (
,
instead of\,
):no_proxy=localhost,127.0.0.0/24
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
First reported in podman-desktop/podman-desktop#7894
The text was updated successfully, but these errors were encountered: