文件:select_soft_post.php
路径:/include/dialog/select_soft_post.php

原因:在获取完整文件名时,没有将会对服务器造成危害的文件格式过滤掉,因此需要手动添加代码过滤

解决方法:

1、在 select_soft_post.php 中找到如下代码:

$fullfilename = $cfg_basedir.$activepath.’/’.$filename;

2、在其上面添加如下代码:

if (preg_match(‘#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)[^a-zA-Z0-9]+$#i’, trim($filename))) {
    ShowMsg(“你指定的文件名被系统禁止!”,’javascript:;’);
    exit();
}

原文链接:https://blog.csdn.net/L_melody/article/details/99549932

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部