diff options
| -rwxr-xr-x | admin/admin_system.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/admin/admin_system.php b/admin/admin_system.php index 31a1d53..2929aee 100755 --- a/admin/admin_system.php +++ b/admin/admin_system.php @@ -78,7 +78,8 @@ if( !empty( $_GET['prune'] ) ) { foreach( $diskUsage as $key => $item ) { if( $_GET['prune'] == $key || $_GET['prune'] == 'all' ) { $dir = $item['path'].( !empty( $item['subdir'] ) ? '/'.$item['subdir'] : '' ); - if( is_dir( $dir ) && strpos( $item['path'], BIT_ROOT_PATH ) === 0 ) { + $safeRoot = strpos( $item['path'], BIT_ROOT_PATH ) === 0 || strpos( $item['path'], TEMP_PKG_PATH ) === 0 || strpos( $item['path'], STORAGE_PKG_PATH ) === 0; + if( is_dir( $dir ) && $safeRoot ) { if( KernelTools::unlink_r( $dir )) { $reload = true; } else { |
