dedecms后台文件任意上传漏洞(media_add.php)

文件:media_add.php

路径:.../dede/media_add.php

解决方案:

查找文件位置:/dede/media_add.php ,大概在69行左右,找到:

$fullfilename = $cfg_basedir.$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.$filename;

猜你喜欢

转载自blog.csdn.net/L_melody/article/details/86551731