mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-07-13 02:41:06 +08:00
Pre Merge pull request !29 from LiuPengFei/v6
This commit is contained in:
commit
cc1eb16de9
@ -116,7 +116,7 @@ class Upload extends Controller
|
||||
$this->error('文件路径不能出现跳级操作!');
|
||||
}
|
||||
// 检查文件后缀是否被恶意修改
|
||||
if (pathinfo(parse_url($saveName, PHP_URL_PATH), PATHINFO_EXTENSION) !== $extension) {
|
||||
if (strtolower(pathinfo(parse_url($saveName, PHP_URL_PATH), PATHINFO_EXTENSION)) !== $extension) {
|
||||
$this->error('文件后缀异常,请重新上传文件!');
|
||||
}
|
||||
// 屏蔽禁止上传指定后缀的文件
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user