阳光网驿-企业信息化交流平台【DTC零售连锁全渠道解决方案】

 找回密码
 注册

QQ登录

只需一步,快速开始

扫描二维码登录本站

手机号码,快捷登录

老司机
查看: 951|回复: 0

Discuz uc.key泄露导致代码注入漏洞修复

[复制链接]
  • TA的每日心情
    开心
    2021-8-30 00:00
  • 签到天数: 35 天

    [LV.5]常住居民I

    发表于 2016-8-27 12:37:41 | 显示全部楼层 |阅读模式
    修复方式:
    1. 查找 updatebadwords 函数:
    function updatebadwords($get, $post){
        // ...
        // 添加: 约241行   
        // Discuz uc.key泄露导致代码注入漏洞
        if(substr($v['findpattern'], 0, 1) != '/' || substr($v['findpattern'], -3) != '/is') {
            $v['findpattern'] = '/' . preg_quote($v['findpattern'], '/') . '/is';
        }
        // -- end : 2016-08-22 --

        $data['findpattern'][$k] = $v['findpattern'];
        // ...
    }

    2. 查找 updateapps 函数:
    function updateapps($get, $post) {
        // ...
        // 修改: 约280行
        $UC_API = '';
        if($post['UC_API']) {
            // $UC_API = $post['UC_API']; // 注释
            $UC_API = str_replace(array('\'', '"', '\\', "\0", "\n", "\r"), '', $post['UC_API']);
            unset($post['UC_API']);
        }
        // ...
    }
    楼主热帖
    启用邀请码注册,提高发帖质量,建设交流社区
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表