From eadd494a9b16126147409da49c7ccfcc21bdd939 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 11 Dec 2020 16:55:52 +0800 Subject: [PATCH] * fix bug. --- module/file/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/file/model.php b/module/file/model.php index 947b45ff98..229009f30e 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -902,8 +902,7 @@ class fileModel extends model setcookie('downloading', 1, 0, $this->config->webRoot, '', false, false); /* Only download upload file that is in zentao. */ - if($type == 'file' and stripos($content, $this->app->getBasePath()) !== 0) die(); - if($type == 'file' and stripos($content, '/data/upload/') === false) die(); + if($type == 'file' and stripos($content, $this->savePath) !== 0) die(); /* Append the extension name auto. */ $extension = '.' . $fileType;