关于阿里云提醒“phpcms v9宽字节注入题目”的破绽修复计划
简介: 破绽称号:phpcms v9宽字节注入题目 补丁文件:www/phpcms/modules/pay/respond.php 补丁泉源:云盾自研 破绽形貌:phpcmsv9.5.9今后版本最先默许运用mysqli支撑,在phpcms/modules/pay/respond.php中,由于代码逻辑不够严谨, 致使宽字节注入。【注重:该补丁为云盾自研代码修复计划,云盾会根据您当前代码是不是相符云盾自研的修复形式举行检测, 如果您自行采取了底层/框架一致修复、或许运用了其他的修复计划,可能会致使您虽然已修复了该破绽,云盾依旧报告存在 破绽,碰到该状况可选择疏忽该破绽提醒】 … 阿里云破绽提醒。
解决办法:
1、翻开www/phpcms/modules/pay/respond.php,代码第14行摆布;
2、找到respond_get()替换成下面的代码,代码以下:
public function respond_get() { if ($_GET['code']){ $code = mysql_real_escape_string($_GET['code']);//注重修正 $payment = $this->get_by_code($code);//注重修正 if(!$payment) showmessage(L('payment_failed')); $cfg = unserialize_config($payment['config']); $pay_name = ucwords($payment['pay_code']); pc_base::load_app_class('pay_factory','',0); $payment_handler = new pay_factory($pay_name, $cfg); $return_data = $payment_handler->receive(); if($return_data) { if($return_data['order_status'] == 0) { $this->update_member_amount_by_sn($return_data['order_id']); } $this->update_recode_status_by_sn($return_data['order_id'],$return_data['order_status']); showmessage(L('pay_success'),APP_PATH.'index.php?m=pay&c=deposit'); } else { showmessage(L('pay_failed'),APP_PATH.'index.php?m=pay&c=deposit'); } } else { showmessage(L('pay_success')); } }
增加后的代码,截图示例以下:
3、然后,将修正好的文件,上传到服务器对应文件位置,直接掩盖;
4、末了,登录阿里云背景,点击考证(截图以下),即可完成破绽修复。
以上就是关于“phpcms v9宽字节注入题目”破绽修复的全部内容。
ki4网,大批的免费PHPCMS教程,迎接在线进修!
以上就是PHPCMS破绽之v9宽字节注入题目的细致内容,更多请关注ki4网别的相干文章!