问题文件:在/include/dialog/select_soft_post.php文件
解决方法:
先找到这个文件/include/dialog/select_soft_post.php,找到大概72,73行的
$fullfilename = $cfg_basedir.$activepath.'/'.$filename;
在这行代码之前增加:
//任意文件上传漏洞修复----start----- if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)[^a-zA-Z0-9]+$#i', trim($filename))){ ShowMsg("你指定的文件名被系统禁止!",'javascript:;'); exit(); } //任意文件上传漏洞修复-----end-----
然后保存上传服务器就OK了!
本文详细介绍了在/include/dialog/select_soft_post.php文件中修复任意文件上传漏洞的方法。通过在代码中加入正则表达式检查,阻止恶意文件上传,提高系统安全性。
4438

被折叠的 条评论
为什么被折叠?



