From 35e7d2398393ba7b60db3c168e78c29110c36d5f Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 25 Nov 2015 15:18:19 +0100 Subject: [PATCH] print_property_string: skip keys early Keys in the skip-list don't need to be valid schema keys. This was overly strict before which makes it harder to include temporary internal keys in a such an object. --- debian/changelog | 2 ++ src/PVE/JSONSchema.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index a56c148..0579a0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ libpve-common-perl (4.0-39) unstable; urgency=medium * add function file_copy + * print_property_string: skip keys early + -- Proxmox Support Team Thu, 26 Nov 2015 08:09:04 +0100 libpve-common-perl (4.0-38) unstable; urgency=medium diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index e83d8de..a9a5400 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -582,9 +582,9 @@ sub print_property_string { } foreach my $key (sort keys %$data) { - die "invalid key: $key" if !$allowed{$key}; delete $required{$key}; next if $skipped{$key}; + die "invalid key: $key" if !$allowed{$key}; my $typeformat = $format->{$key}->{format}; my $value = $data->{$key}; -- 2.39.2