dedecmsV5.7 任意文件上傳漏洞修復

問題文件:在/include/dialog/select_soft_post.php文件javascript

解決方法:php

先找到這個文件/include/dialog/select_soft_post.php,找到大概72,73行的html

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

在這行代碼以前增長:java

//任意文件上傳漏洞修復----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了!服務器

相關文章
相關標籤/搜索