最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
dedecms上传漏洞uploadsafe.inc.php修复方案
时间:2022-06-25 19:20:41 编辑:袖梨 来源:一聚教程网
涉及文件及其路径
文件:uploadsafe.inc.php
路径:/include/uploadsafe.inc.php。
修复方法
修复这个漏洞有两个地方需要修改,咱们一个一个来说。
1、第一处:找到下面这句:(第42行)
| 代码如下 | 复制代码 |
| ${$_key.’_size’} = @filesize($$_key); } | |
替换成
| 代码如下 | 复制代码 |
| ${$_key.’_size’} = @filesize($$_key);} $imtypes = array(“image/pjpeg”, “image/jpeg”, “image/gif”, “image/png”, “image/xpng”, “image/wbmp”, “image/bmp”); if(in_array(strtolower(trim(${$_key.’_type’})), $imtypes)) { $image_dd = @getimagesize($$_key); if($image_dd == false){ continue; } if (!is_array($image_dd)) { exit(‘Upload filetype not allow !’); } } | |
2、第二处:找到下面这句(替换第一处后处于第55行)
| 代码如下 | 复制代码 |
|
$image_dd = @getimagesize($$_key); $image_dd = @getimagesize($$_key); if($image_dd == false){ continue; } | |
保存在检测就发现漏洞已经修复了。请大家注意备份文件,在修改过的地方做好批注。
相关文章
- 差差漫画-登录入口官网 03-01
- 羞羞漫画免费看-羞羞漫画极速登录 03-01
- 羞羞漫画韩国合集资源-羞羞漫画全网在线读站 03-01
- 哔咔漫画APP会员特别版PicACG解锁全部资源最新版本下载 - 哔咔漫画去广告攻略2024安卓安装入口 03-01
- deepseek电脑版下载-deepseek智能软件 03-01
- Deepseek官网入口-Deepseek最新下载 03-01