From: Dietmar Maurer Date: Fri, 2 Oct 2015 09:24:43 +0000 (+0200) Subject: run_cli_handler: test for unknown parameters X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=aa9b9af5a81acdac12403506085e0c2bf769497b run_cli_handler: test for unknown parameters --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index c75c8dc..61434cc 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -479,6 +479,12 @@ sub run_cli_handler { $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};