]> git.proxmox.com Git - pve-access-control.git/commitdiff
rpcenv->permissions() ensure propagate is always defined
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 21 Jan 2022 10:57:30 +0000 (11:57 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 21 Jan 2022 13:21:04 +0000 (14:21 +0100)
this shouldn't happen anymore, but a safeguard in case the parser ever
has a bug does not hurt.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/RPCEnvironment.pm

index 7725a4d5a6df45ab3129f80d97b5d8fcd8756bd3..b1348fab8f38141606cbce5a61d2d6a4ded3253d 100644 (file)
@@ -86,6 +86,11 @@ my $compile_acl_path = sub {
        $privs = { map { $_ => $user_privs->{$_} && $privs->{$_} } @$filtered_privs };
     }
 
+    foreach my $priv (keys %$privs) {
+       # safeguard, this should never happen anyway
+       delete $privs->{$priv} if !defined($privs->{$priv});
+    }
+
     $data->{privs}->{$path} = $privs;
 
     return $privs;