update to 1.2.1

add phar build script
This commit is contained in:
whale
2020-05-02 23:27:26 +08:00
parent 97e579b8a1
commit 82a1f86bbd
19 changed files with 292 additions and 119 deletions

View File

@@ -17,6 +17,7 @@ use ZM\Http\MiddlewareInterface;
use ZM\Http\Response;
use ZM\ModBase;
use ZM\ModHandleType;
use Framework\DataProvider;
use ZM\Utils\ZMUtil;
class RequestEvent implements SwooleEvent
@@ -90,7 +91,7 @@ class RequestEvent implements SwooleEvent
$path = realpath($base_dir . urldecode($uri));
if ($path !== false) {
if (is_dir($path)) $path = $path . '/';
$work = realpath(WORKING_DIR) . '/';
$work = realpath(DataProvider::getWorkingDir()) . '/';
if (strpos($path, $work) !== 0) {
$this->responseStatus(403);
return $this;