]> git.proxmox.com Git - pve-common.git/commitdiff
run_cli_handler: test for unknown parameters
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 2 Oct 2015 09:24:43 +0000 (11:24 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 2 Oct 2015 09:24:43 +0000 (11:24 +0200)
src/PVE/CLIHandler.pm

index c75c8dc9a3cec99e954b0a52a3bc62446ba83b02..61434cc87206ce21f7569b2f40a890ccb3904636 100644 (file)
@@ -479,6 +479,12 @@ sub run_cli_handler {
 
     $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
 
 
     $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
 
+    foreach my $key (keys %params) {
+       next if $key eq 'podfn';
+       next if $key eq 'preparefunc';
+       die "unknown parameter '$key'";
+    }
+
     my $podfn = $params{podfn};
     my $preparefunc = $params{preparefunc};
 
     my $podfn = $params{podfn};
     my $preparefunc = $params{preparefunc};