]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/CLI/pvesm.pm
(remote) export: check and untaint format
[pve-storage.git] / PVE / CLI / pvesm.pm
index 003b019e9af769561234e04dde5479d00ba95271..9b9676b4a2864a2368bf3c3ba436ddca8047a4bf 100755 (executable)
@@ -30,8 +30,6 @@ use PVE::CLIHandler;
 
 use base qw(PVE::CLIHandler);
 
-my $KNOWN_EXPORT_FORMATS = ['raw+size', 'tar+size', 'qcow2+size', 'vmdk+size', 'zfs', 'btrfs'];
-
 my $nodename = PVE::INotify::nodename();
 
 sub param_mapping {
@@ -269,7 +267,7 @@ __PACKAGE__->register_method ({
            format => {
                description => "Export stream format",
                type => 'string',
-               enum => $KNOWN_EXPORT_FORMATS,
+               enum => $PVE::Storage::KNOWN_EXPORT_FORMATS,
            },
            filename => {
                description => "Destination file name",
@@ -355,7 +353,7 @@ __PACKAGE__->register_method ({
            format => {
                description => "Import stream format",
                type => 'string',
-               enum => $KNOWN_EXPORT_FORMATS,
+               enum => $PVE::Storage::KNOWN_EXPORT_FORMATS,
            },
            filename => {
                description => "Source file name. For '-' stdin is used, the " .