[pve-devel] [PATCH container] config: allow empty environment variables
Fabian Grünbichler
f.gruenbichler at proxmox.com
Mon Nov 17 14:59:29 CET 2025
On November 17, 2025 1:49 pm, Filip Schauer wrote:
> This fixes a problem with the docker.io/httpd OCI image which specifies
> an empty environment variable. This violated the pattern of the `env`
> property, causing `pct config <vmid>` to fail with:
shouldn't we handle this and drop that environment variable entry
instead?
> ```
> env: value does not match the regex pattern
> ```
>
> Signed-off-by: Filip Schauer <f.schauer at proxmox.com>
> ---
> src/PVE/LXC/Config.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
> index cd3a172..b6fc9a8 100644
> --- a/src/PVE/LXC/Config.pm
> +++ b/src/PVE/LXC/Config.pm
> @@ -671,7 +671,7 @@ my $confdesc = {
> description => 'The container runtime environment as NUL-separated list.'
> . ' Replaces any lxc.environment.runtime entries in the config.',
> optional => 1,
> - pattern => qr/(?:\w+=[^\x00-\x1F\x7F]+)(?:\0\w+=[^\x00-\x1F\x7F]+)*/,
> + pattern => qr/(?:\w+=[^\x00-\x1F\x7F]*)(?:\0\w+=[^\x00-\x1F\x7F]*)*/,
> },
> hookscript => {
> optional => 1,
> --
> 2.47.3
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
More information about the pve-devel
mailing list