-
Notifications
You must be signed in to change notification settings - Fork 401
Open
Description
问题描述
在RestUpdateController中的list方法中存在查询语句PageInfo<UpdateRecorde> pageInfo = updateRecordeService.findPageBreakByCondition(vo);,并且这个方法需要权限注解@RequiresPermissions("updateLogs"),但是在RenderController的updateLog方法中,也存在类似的查询语句model.addAttribute("list", updateRecordeService.listAll());,然而RenderController的updateLog方法并不存在相关的权限注解。攻击者是否可以通过直接访问RenderController的updateLog接口,从而绕过RestUpdateController的list方法的应有的权限保护,从而获取到敏感数据。
相关代码
- 可以看见在这里需要
@RequiresPermissions("updateLogs")
// in RestUpdateController
// 这个方法中存在一条查询语句
@RequiresPermissions("updateLogs")
@PostMapping("/list")
public PageResult list(UpdateRecordeConditionVO vo) {
PageInfo<UpdateRecorde> pageInfo = updateRecordeService.findPageBreakByCondition(vo);
return ResultUtil.tablePage(pageInfo);
}
public interface SysUpdateRecordeService extends AbstractService<UpdateRecorde, Long> {
PageInfo<UpdateRecorde> findPageBreakByCondition(UpdateRecordeConditionVO vo);
}
// in SysUpdateRecordeMapper
<select id="findPageBreakByCondition" parameterType="com.zyd.blog.business.vo.UpdateRecordeConditionVO" resultMap="rm">
SELECT
t.*
FROM
sys_update_recorde t
WHERE
1 = 1
</select>- 然而在
RenderController存在类似的查询, 缺乏相应的权限保护
// in RenderController
@GetMapping("/updateLog")
@BussinessLog(value = "进入更新记录页", platform = PlatformEnum.WEB)
public ModelAndView updateLog(Model model) {
model.addAttribute("list", updateRecordeService.listAll());
return ResultUtil.view("updateLog");
}Metadata
Metadata
Assignees
Labels
No labels