From d4adc8233e27e9d68758679725bf238ae6081d09 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 20 Oct 2021 09:49:55 +0800 Subject: [PATCH] fix: AddDisk with no driver name #449 . --- common.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common.php b/common.php index 05b8ac1..994e00f 100644 --- a/common.php +++ b/common.php @@ -262,6 +262,10 @@ function main($path) // Add disk if (isset($_GET['AddDisk'])) { + if ($_GET['AddDisk']===true) { + $tmp = path_format($_SERVER['base_path'] . '/' . $path); + return output('Please visit ' . $tmp . '.', 301, [ 'Location' => $tmp ]); + } if ($_SERVER['admin']) { if (!class_exists($_GET['AddDisk'])) require 'disk' . $slash . $_GET['AddDisk'] . '.php'; $drive = new $_GET['AddDisk']($_GET['disktag']);