From 00e944c7cab8fefe285fbdeb60e446b3325cee0c Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 6 Jun 2018 06:37:22 +0200 Subject: [PATCH 1/1] JSONSchema: fix getopt when invoking without arguments --- PVE/JSONSchema.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/JSONSchema.pm b/PVE/JSONSchema.pm index 0e722b8..edd1caf 100644 --- a/PVE/JSONSchema.pm +++ b/PVE/JSONSchema.pm @@ -1406,6 +1406,8 @@ sub get_options { raise("too many arguments\n", code => HTTP_BAD_REQUEST) if scalar(@$args) != 0; } + } else { + raise("not enough arguments\n", code => HTTP_BAD_REQUEST) if ref($arg_param) && scalar(@$arg_param); } if (my $pd = $schema->{properties}->{password}) { -- 2.39.2