plugin: lvm: volume snapshot info: untaint snapshot filename
Without untainting, offline-deleting a volume-chain snapshot on an LVM
storage via the GUI can fail with an "Insecure dependecy in exec
[...]" error, because volume_snapshot_delete uses the filename its
qemu-img invocation.
Commit 93f0dfb ("plugin: volume snapshot info: untaint snapshot
filename") fixed this already for the volume_snapshot_info
implementation of the Plugin base class, but missed that the LVM
plugin overrides the method and was still missing the untaint.
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Link: https://lore.proxmox.com/20250731071306.11777-1-f.weber@proxmox.com
This commit is contained in:
committed by
Thomas Lamprecht
parent
74b5031c9a
commit
92efe5c6cb
@ -831,6 +831,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->($snapfile);
|
||||
#not a proxmox snapshot
|
||||
next if !$snapname;
|
||||
|
||||
Reference in New Issue
Block a user