]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
api: handle undefined shellcmd parameter better
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Apr 2019 11:27:52 +0000 (11:27 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Apr 2019 11:27:52 +0000 (11:27 +0000)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Nodes.pm

index ad3f6e42908ee8238d7a8dd4a2c012be881d12fa..df47be1fd0d6cb3ad25e2d0a87c262a5bd98a892 100644 (file)
@@ -711,7 +711,7 @@ sub get_shell_command  {
     my ($user, $shellcmd) = @_;
 
     if ($user eq 'root@pam') {
-       if (exists($shell_cmd_map->{$shellcmd})) {
+       if (defined($shellcmd) && exists($shell_cmd_map->{$shellcmd})) {
            return $shell_cmd_map->{$shellcmd};
        } else {
            return [ '/bin/login', '-f', 'root' ];