From: Shannon Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container] oci restore: allow tabs in oci config
Date: Tue, 18 Nov 2025 12:02:58 +0100 [thread overview]
Message-ID: <20251118110258.103565-1-s.sterz@proxmox.com> (raw)
it is fairly common to use tabs in oci configs. for example, the php
oci image from docker uses them quite extensively [1]. so exclude them
from the control characters we check for.
[1]:
https://github.com/docker-library/php/blob/8e01ffe94ed4ccca7c0a37be6dcb45995cf5d93b/8.3/trixie/apache/Dockerfile#L20
Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
noticed this while trying to set up a nextcloud image from docker hub
[2]. we might want toe rename the helper here now though, as we don't
check for *all* control characters anymore.
[2]: https://hub.docker.com/layers/library/nextcloud/stable/images/sha256-53a2c0408d18831a526a5587f621090e6a8125209912a909e67b7e48a3140f2f
src/PVE/LXC/Create.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PVE/LXC/Create.pm b/src/PVE/LXC/Create.pm
index 2382118..38af76d 100644
--- a/src/PVE/LXC/Create.pm
+++ b/src/PVE/LXC/Create.pm
@@ -682,7 +682,7 @@ sub restore_oci_archive {
);
# should we rather validate this on the rust side already?
- my $has_ctrl_char = sub { return $_[0] =~ /[\x00-\x1F\x7F]/; };
+ my $has_ctrl_char = sub { return $_[0] =~ /[\x00-\x08\x10-\x1F\x7F]/; };
my $oci_config_get_checked_scalar = sub {
my ($key) = @_;
my $value = $unsafe_oci_config->{$key} // return;
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-11-18 11:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 11:02 Shannon Sterz [this message]
2025-11-18 12:19 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251118110258.103565-1-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox