fix(漏洞): 新闻、通知加xss过滤

This commit is contained in:
ZhangZhiYi
2026-08-13 11:42:51 +08:00
parent a66e9e1441
commit 284b714c1e
7 changed files with 166 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package com.fastbee.system.service.impl;
import java.util.List;
import com.fastbee.common.utils.html.RichTextSanitizer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fastbee.system.domain.SysNotice;
@@ -51,6 +52,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService
@Override
public int insertNotice(SysNotice notice)
{
notice.setNoticeContent(RichTextSanitizer.sanitize(notice.getNoticeContent()));
return noticeMapper.insertNotice(notice);
}
@@ -63,6 +65,7 @@ public class SysNoticeServiceImpl implements ISysNoticeService
@Override
public int updateNotice(SysNotice notice)
{
notice.setNoticeContent(RichTextSanitizer.sanitize(notice.getNoticeContent()));
return noticeMapper.updateNotice(notice);
}