fix: 解决HTML转义安全问题
- 在多个DTO类中添加HtmlUtil导入并实现自动转义功能 - 为AccountDTO、ConDoctorDTO等类的set方法增加HTML转义处理 - 修复ConDoctorServiceImpl中的重复转义代码 - 为EmergencyProfessionUserController添加请求参数转义 - 修复OrderServiceImpl中的用户名称转义处理 - 为Watch相关服务增加数据绑定和查询时的转义处理 - 修复SysUser相关控制器和服务中的转义逻辑
This commit is contained in:
+4
@@ -1,5 +1,6 @@
|
||||
package com.renkang.watch.bean.request;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -19,6 +20,9 @@ public class AbnormalEventFilter {
|
||||
private String departOrgCode;
|
||||
// 用户名称
|
||||
private String userName;
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName != null ? HtmlUtil.unescape(userName) : null;
|
||||
}
|
||||
// 工具编码
|
||||
private String watchNo;
|
||||
//员工编号
|
||||
|
||||
+5
@@ -1,5 +1,6 @@
|
||||
package com.renkang.watch.dto;
|
||||
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@@ -18,6 +19,10 @@ public class CalorieDataByUserDTO {
|
||||
private Integer pageSize = 10;
|
||||
@Schema(title = "用户姓名")
|
||||
private String realName;
|
||||
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName != null ? HtmlUtil.unescape(realName) : null;
|
||||
}
|
||||
@Schema(title = "工号")
|
||||
private String workNo;
|
||||
@Schema(title = "用户id组")
|
||||
|
||||
Reference in New Issue
Block a user