ThinkSNS 4.0 一处设计缺陷(可伪造任意人发朋友圈)

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: 通常用于诈骗! ### 详细说明: 官方的demo已经是4.0,可惜下不到源码 翻来看看ThinkSNS 3.0的源码,发现一处严重的设计缺陷 apps\public\Lib\Action\AccountAction.class.php 下doSaveProfile方法为保存用户信息操作 ``` /** * 保存基本信息操作 * @return json 返回操作后的JSON信息数据 */ public function doSaveProfile() { $res = true; // 保存用户表信息 if(!empty($_POST['sex'])) { $save['sex'] = 1 == intval($_POST['sex']) ? 1 : 2; //$save['lang'] = t($_POST['lang']); $save['intro'] = t($_POST['intro']); // 添加地区信息 $save['location'] = t($_POST['city_names']); $cityIds = t($_POST['city_ids']); $cityIds = explode(',', $cityIds); if(!$cityIds[0] || !$cityIds[1] || !$cityIds[2]) $this->error('请选择完整地区'); isset($cityIds[0]) && $save['province'] = intval($cityIds[0]); isset($cityIds[1]) && $save['city'] = intval($cityIds[1]); isset($cityIds[2]) && $save['area'] = intval($cityIds[2]); // 修改用户昵称 $uname = t($_POST['uname']); $oldName = t($_POST['old_name']); $save['uname'] = filter_keyword($uname); $res = model('Register')->isValidName($uname, $oldName);//这里跟进 if(!$res) { $error =...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息