From b6282742a28e78334f0873f8896c6b2b69dc4356 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 10 Jun 2021 14:12:25 -0600 Subject: [PATCH] Filemanager: Fix root access was stopped after removing custom ACL (cherry picked from commit eb59b6bf6552e39b6b76c52d589abc88f4dc2c9e) --- filemanager/inc/class.filemanager_ui.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index a997eab7a4..5d34dcf6fe 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -1178,11 +1178,11 @@ class filemanager_ui $button = @key($content['button']); unset($content['button']); - if(!$button && $content['sudo']) + if(!$button && $content['sudo'] && $content['sudouser']) { // Button to stop sudo is not in button namespace $button = 'sudo'; - unset($content['sudo']); + unset($content['sudo'], $content['sudouser']); } // need to check 'setup' button (submit button in sudo popup), as some browsers (eg. chrome) also fill the hidden field if ($button == 'sudo' && Vfs::$is_root || $button == 'setup' && $content['sudo']['user'])