织梦DedeCms任意文件上传漏洞修复

一、

/include/dialog/select_soft_post.php文件,搜索(大概在72行的样子)      

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

修改为      

if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)[^a-zA-Z0-9]+$#i', trim($filename))) 

ShowMsg("你指定的文件名被系统禁止!",'javascript:;'); exit();

 }

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

猜你喜欢

转载自blog.csdn.net/qq_31763129/article/details/80942289