phpcms宽字节注入【phpcms/modules/pay/respond.php】
[ 2016/10/04, Phpcms , 4559阅, 0评 ]

漏洞名称:phpcmsv9宽字节注入

补丁文件:/phpcms/modules/pay/respond.php

漏洞描述:phpcmsv9.5.9以后版本开始默认使用mysqli支持,在\phpcms\modules\pay\respond.php中,因为代码逻辑不够严谨,导致宽字节注入。【注意:该补丁为云盾自研代码修复方案,云盾会根据您当前代码是否符合云盾自研的修复模式进行检测,如果您自行采取了底层/框架统一修复、或者使用了其他的修复方案,可能会导致您虽然已经修复了改漏洞,云盾依然报告存在漏洞,遇到该情况可选择忽略该漏洞提示】

源代码:

/**
* return_url get形式响应
*/
public function respond_get() {
if ($_GET['code']){
$payment = $this->get_by_code($_GET['code']);
if(!$payment) showmessage(L('payment_failed'));
$cfg = unserialize_config($payment['config']);

补丁代码:

/**
* return_url get形式响应
*/
public function respond_get() {
if ($_GET['code']){
$payment = $this->get_by_code(mysql_real_escape_string($_GET['code']));  //补丁
if(!$payment) showmessage(L('payment_failed'));
$cfg = unserialize_config($payment['config']); 

有朋自远方来...评论一下呗O(∩_∩)O