aliyun、 云盾 、云安全中心 、漏洞修复、dedecmsv5.7sp2(20180109)版本
打开dedecms/member/album_add.php文件,查找以下代码(大约220行左右)代码 $description = HtmlReplace($description, -1);下方加$mtypesid = intval($mtypesid);
打开/member/inc/archives_check_edit.php文件,查找以下代码(大约92行左右)代码 $litpic =$oldlitpic;下方加if (strpos( $litpic, '..') !== false || strpos( $litpic, $cfg_user_dir.'/{$userid}/' ) === false) exit('not allowed path!');
打开/member/inc/inc_archives_functions.php文件,查找以下代码(大约239行左右)代码 echo '';替换为:echo '';
打开/member/soft_add.php文件,查找以下代码(大约155行左右)代码 $urls .= '{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n';替换为:if (preg_match('#}(.*?){/dede:link}{dede:#sim', $servermsg1) != 1) { $urls .= '{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n'; }
打开/member/article_add.php文件,查找以下代码(大约83行左右)代码 if (empty($dede_fieldshash) || $dede_fieldshash != md5($dede_addonfields.$cfg_cookie_encode))替换为:if (empty($dede_fieldshash) || ( $dede_fieldshash != md5($dede_addonfields . $cfg_cookie_encode) && $dede_fieldshash != md5($dede_addonfields . 'anythingelse' . $cfg_cookie_encode)) )
打开/dede/media_add.php文件,查找以下代码(大约70行左右)代码 $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(); }
打开/plus/guestbook/edit.inc.php文件,查找以下代码(大约54行左右)代码 $msg = HtmlReplace($msg, -1);替换为:$msg = addcslashes(HtmlReplace($msg, -1));
打开include/uploadsafe.inc.php文件,查找以下代码(大约8行左右)代码 $cfg_not_allowall = 'php|pl|cgi|asp|aspx|jsp|php3|shtm|shtml';替换为:$cfg_not_allowall = 'php|pl|cgi|asp|aspx|jsp|php3|shtm|shtml|htm|html';查找以下代码(大约53行左右)代码 $image_dd = @getimagesize($$_key);下面添加:if($image_dd == false){ continue; }
然后进入aliyun后台 点击验证,如图所示