原因说明:前台申请讲师功能点存在存储型xss漏洞,攻击者可以获取管理员登录cookie,进行劫持钓鱼等危害
修改文件:app\wap\model\merchant\UserEnter
修改方法:setUserEnter()
public static function setUserEnter($data, $uid)
{
$data['address'] = strip_tags($data['address']);
$data['merchant_name'] = strip_tags($data['merchant_name']);
$data['explain'] = strip_tags($data['explain']);
$data['introduction'] = strip_tags($data['introduction']);
$data['charter'] = json_encode($data['charter']);
$data['label'] = json_encode($data['label']);
if (self::be(['uid' => $uid])) {
$data['status'] = 0;
return self::edit($data, $uid, 'uid');
} else {
if (self::be(['link_tel' => $data['link_tel']])) return self::setErrorInfo('该手机号已使用,不可重复使用!');
$data['uid'] = $uid;
$data['add_time'] = time();
return self::set($data);
}
}
修改文件:app\web\model\merchant\UserEnter
修改方法:setUserEnter()
public static function setUserEnter($data, $uid)
{
$data['address'] = strip_tags($data['address']);
$data['merchant_name'] = strip_tags($data['merchant_name']);
$data['explain'] = strip_tags($data['explain']);
$data['introduction'] = strip_tags($data['introduction']);
$data['charter'] = json_encode($data['charter']);
$data['label'] = json_encode($data['label']);
if (self::be(['uid' => $uid])) {
$data['status'] = 0;
return self::edit($data, $uid, 'uid');
} else {
if (self::be(['link_tel' => $data['link_tel']])) return self::setErrorInfo('该手机号已使用,不可重复使用!');
$data['uid'] = $uid;
$data['add_time'] = time();
return self::set($data);
}
}