修复PostController.class.php中的BUG
个人中心允许越权查看他人报告 issued by niliu
This commit is contained in:
@@ -78,7 +78,7 @@ class PostController extends BaseController
|
|||||||
$id = session('userId');
|
$id = session('userId');
|
||||||
$rid = I('get.rid',0,'intval');
|
$rid = I('get.rid',0,'intval');
|
||||||
$model = M("Post");
|
$model = M("Post");
|
||||||
$post = $model->where('user_id='.$id)->where('id='.$rid)->find();
|
$post = $model->where(array('user_id'=>$id,'id'=>$rid))->find();
|
||||||
$tmodel= M('setting');
|
$tmodel= M('setting');
|
||||||
$title = $tmodel->where('id=1')->select();
|
$title = $tmodel->where('id=1')->select();
|
||||||
$this->assign('title', $title);
|
$this->assign('title', $title);
|
||||||
|
|||||||
Reference in New Issue
Block a user