]> git.proxmox.com Git - pve-common.git/commitdiff
print_property_string: skip keys early
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 25 Nov 2015 14:18:19 +0000 (15:18 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Nov 2015 11:10:48 +0000 (12:10 +0100)
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
src/PVE/JSONSchema.pm

index a56c14886b22b5cfaed60a19f858bb074ea7ecfc..0579a0e914a4a796c7b3b03f5915679b71f8efab 100644 (file)
@@ -2,6 +2,8 @@ libpve-common-perl (4.0-39) unstable; urgency=medium
 
   * add function file_copy
 
 
   * add function file_copy
 
+  * print_property_string: skip keys early
+
  -- Proxmox Support Team <support@proxmox.com>  Thu, 26 Nov 2015 08:09:04 +0100
 
 libpve-common-perl (4.0-38) unstable; urgency=medium
  -- Proxmox Support Team <support@proxmox.com>  Thu, 26 Nov 2015 08:09:04 +0100
 
 libpve-common-perl (4.0-38) unstable; urgency=medium
index e83d8dea42a3797bc610530bea86f3aca6a6f5ea..a9a5400593c0954c2a3cc62ff76d8914744e1ed5 100644 (file)
@@ -582,9 +582,9 @@ sub print_property_string {
     }
 
     foreach my $key (sort keys %$data) {
     }
 
     foreach my $key (sort keys %$data) {
-       die "invalid key: $key" if !$allowed{$key};
        delete $required{$key};
        next if $skipped{$key};
        delete $required{$key};
        next if $skipped{$key};
+       die "invalid key: $key" if !$allowed{$key};
 
        my $typeformat = $format->{$key}->{format};
        my $value = $data->{$key};
 
        my $typeformat = $format->{$key}->{format};
        my $value = $data->{$key};