来源:未知 时间:2015-04-15 13:08 作者:xxadmin 阅读:次
[导读] ThinkSNS 防御绕过思路(union select 真正的无限制sql注射) public function bulkDoFollow() { // 安全过滤 $res = $this-_follow_model-bulkDoFollow($this-mid, t($_POST[fids])); $this-ajaxReturn($res, $this-_follow_model-getError(...
ThinkSNS 防御绕过思路(union select 真正的无限制sql注射) public function bulkDoFollow() { // 安全过滤 $res = $this->_follow_model->bulkDoFollow($this->mid, t($_POST['fids'])); $this->ajaxReturn($res, $this->_follow_model->getError(), false !== $res); }
public function bulkDoFollow($uid, $fids) { $follow_states = $this->getFollowStateByFids($uid, $fids);
public function getFollowStateByFids($uid, $fids) { array_map( 'intval' , $fids); $_fids = is_array($fids) ? implode(',', $fids) : $fids; if(empty($_fids)) { return array(); } $follow_data = $this->where(" ( uid = '{$uid}' AND fid IN({$_fids}) ) OR ( uid IN({$_fids}) and fid = '{$uid}')")->findAll(); $follow_states = $this->_formatFollowState($uid, $fids, $follow_data); 看着一段逻辑 array_map( 'intval' , $fids); $_fids = is_array($fids) ? implode(',', $fids) : $fids;
解决方案:过滤 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com