From 93f0dfbc756e02984d85d5f301314b987d8388f1 Mon Sep 17 00:00:00 2001 From: Friedrich Weber Date: Fri, 25 Jul 2025 17:48:57 +0200 Subject: [PATCH] plugin: volume snapshot info: untaint snapshot filename Without untainting, offline-deleting a volume-chain snapshot on a directory storage via the GUI fails with an "Insecure dependecy in exec [...]" error, because volume_snapshot_delete uses the filename its qemu-img invocation. Signed-off-by: Friedrich Weber --- src/PVE/Storage/Plugin.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm index a817186..2bd05bd 100644 --- a/src/PVE/Storage/Plugin.pm +++ b/src/PVE/Storage/Plugin.pm @@ -1789,6 +1789,7 @@ sub volume_snapshot_info { my $snapshots = $json_decode; for my $snap (@$snapshots) { my $snapfile = $snap->{filename}; + ($snapfile) = $snapfile =~ m|^(/.*)|; # untaint my $snapname = $get_snapname_from_path->($volname, $snapfile); #not a proxmox snapshot next if !$snapname;