From d146e52028241dc32aa1d57e3e88c4aa3b77d654 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 31 Mar 2017 17:05:52 +0200 Subject: [PATCH] check_api2_permissions: avoid warning about uninitialized value --- PVE/RPCEnvironment.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/RPCEnvironment.pm b/PVE/RPCEnvironment.pm index c661eda..95d3029 100644 --- a/PVE/RPCEnvironment.pm +++ b/PVE/RPCEnvironment.pm @@ -351,7 +351,7 @@ sub exec_api2_perm_check { sub check_api2_permissions { my ($self, $perm, $username, $param) = @_; - return 1 if !$username && $perm->{user} eq 'world'; + return 1 if !$username && $perm->{user} && $perm->{user} eq 'world'; raise_perm_exc("user != null") if !$username; -- 2.39.2