Files
podman/pkg/machine/proxyenv
crawfordxx d0f97989ad machine: escape % as %% in proxy values written to systemd unit conf
systemd interprets % as specifier characters in unit configuration files
(e.g. %H, %u, %40). Proxy environment variable values that contain
percent-encoded URL characters (such as %40 for @ in usernames) cause
systemd to emit warnings and fail to parse the generated
/etc/systemd/system.conf.d/default-env.conf:

  system.conf.d/default-env.conf:2: Failed to resolve specifiers in
  HTTP_PROXY=http://user%40example.com@proxy:3128

Fix by adding a bash variable substitution that doubles every % to %%
before writing to the systemd unit conf files. The profile.d and
environment.d destinations do not need this escaping and continue to
use the original value.

Fixes #28698

Signed-off-by: crawfordxx <crawfordxx@users.noreply.github.com>
2026-06-06 12:04:48 +08:00
..