]> git.proxmox.com Git - pve-common.git/commit - src/PVE/SectionConfig.pm
prevent autovivification of sectionconfig options
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 15 May 2019 08:03:50 +0000 (10:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 15 May 2019 08:16:33 +0000 (10:16 +0200)
commitd0ba18e17e96e9a2db54d050c4bd86b6d2d2dd03
tree8119688bb2942634a3baf1df4d8e5cca8cf7ac60
parentc0b8717c443436d724f4e0be9cfce725d8123df0
prevent autovivification of sectionconfig options

If, somehow, someone passes a config to check_config with keys set
that are not in the options for that type, this fixed check
lead to autovivification, meaning that any future calls to the same
worker had an additional option for that type which is not optional

this lead to a wrongfully deleting of entries when updating an entry of
a different type, since all entries of the original types suddenly
did not satisfy their required options and would not get parsed
by read_file anymore (thus missing when a successful write_file was done)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PVE/SectionConfig.pm