fix(消息管理): 删除已读消息api存在IDOR漏洞

This commit is contained in:
fit2cloud-chenyw 2023-05-15 14:13:01 +08:00
parent 96323624a4
commit 52b67a04df
2 changed files with 3 additions and 2 deletions

View File

@ -29,9 +29,10 @@ public interface ExtSysMsgMapper {
"<foreach collection='msgIds' item='msgId' open='(' separator=',' close=')' >",
" #{msgId}",
"</foreach>",
" and user_id = #{uid} ",
"</script>"
})
int batchDelete(@Param("msgIds") List<Long> msgIds);
int batchDelete(@Param("msgIds") List<Long> msgIds, @Param("uid") Long uid);
int batchInsert(@Param("settings") List<SysMsgSetting> settings);

View File

@ -109,7 +109,7 @@ public class SysMsgService {
}
public void batchDelete(List<Long> msgIds) {
extSysMsgMapper.batchDelete(msgIds);
extSysMsgMapper.batchDelete(msgIds, AuthUtils.getUser().getUserId());
}
public void save(SysMsg sysMsg) {