mirror of
https://git.proxmox.com/git/pve-common
synced 2025-04-28 18:53:18 +00:00
download handling: adapt cycle check to check value
instead of whether the key exists in the schema instance, just in case somebody wants to set "download => 0". Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
6dbb3e0e78
commit
c1ed9e3ee6
@ -1370,7 +1370,7 @@ sub validate {
|
||||
my $cycles = 0;
|
||||
# 'download' responses can contain a filehandle, don't cycle-check that as
|
||||
# it produces a warning
|
||||
my $is_download = ref($instance) eq 'HASH' && exists($instance->{download});
|
||||
my $is_download = ref($instance) eq 'HASH' && $instance->{download};
|
||||
find_cycle($instance, sub { $cycles = 1 }) if !$is_download;
|
||||
if ($cycles) {
|
||||
add_error($errors, undef, "data structure contains recursive cycles");
|
||||
|
Loading…
Reference in New Issue
Block a user