fix(security): 补全 XSS sanitize + 修复 sender_id 身份伪造

安全审计修复:
- 补全 6 个 DTO 的 sanitize 方法(diagnosis/consent/alert/medication_record/medication_reminder/follow_up_template)
- 4 个 handler 添加 .sanitize() 调用(diagnosis/consent/alert_rule/medication_record)
- 修复咨询消息 sender_id/sender_role 从客户端提交改为服务端从 JWT 提取
- 修复小程序 AI 报告 markdownToHtml XSS(添加 sanitizeHtml 过滤)
This commit is contained in:
iven
2026-04-30 10:21:52 +08:00
parent d8735eb45c
commit 931edc3025
15 changed files with 154 additions and 83 deletions

View File

@@ -37,8 +37,6 @@ export interface Message {
export interface CreateMessageReq {
session_id: string;
sender_id: string;
sender_role: string;
content_type?: string;
content: string;
}