X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FJSONSchema.pm;h=95529258f19c24535e09dae21dc54471da8b1d37;hp=a9a5400593c0954c2a3cc62ff76d8914744e1ed5;hb=d1e490c12f6c5cf22b5ddd7c5dc78bab0950726b;hpb=c9f0e76bc47a01f47ac95ef6ea9b13f4f0cd709b;ds=sidebyside diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index a9a5400..9552925 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -488,7 +488,10 @@ sub format_size { }; sub parse_property_string { - my ($format, $data, $path) = @_; + my ($format, $data, $path, $additional_properties) = @_; + + # In property strings we default to not allowing additional properties + $additional_properties = 0 if !defined($additional_properties); my $default_key; @@ -528,7 +531,7 @@ sub parse_property_string { } my $errors = {}; - check_object($path, $format, $res, undef, $errors); + check_object($path, $format, $res, $additional_properties, $errors); if (scalar(%$errors)) { raise "format error\n", errors => $errors; }