好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

shopex注册用户任意定义预存款余额或积分 - 网站

shopex在注册用户时存在验证不严,导致注册时可以随意定义预存款余额或积分等字段的内容 在文件\core\shop\controller\ctl.passport.php

 

if( !$info = $account->create($_POST,$message) ) { $this->splash('failed','back',$message,'','',$_POST['from_minipassport']); }

用户注册的变量都保存在$_POST中,继续看根目录文件index.php

 

filterData($_POST); require CORE_DIR.'/include_v5/shopCore.php'; return new shopCore(); //过滤字段 function filterData(&$data) { static $black_list = array( 'order_num','advance','advance_freeze','point_freeze','point_history','member_lv_id', 'point','score_rate','state','role_type','advance_total','advance_consume', 'experience','login_count', ); foreach($black_list as $v) { unset($data[$v]); } }

显然已经意识到这些重要的字段是不允许通过客户端去赋值的,但是没注意大小写的问题。

  注册后用户的预存款余额已经变为99999 修复方案: 注意大小写

查看更多关于shopex注册用户任意定义预存款余额或积分 - 网站的详细内容...

  阅读:46次