Files
hzdyjs/问题整改/手写拼接SQL风险范围清单.md
T
2026-09-18 23:42:09 +08:00

27 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 手写/拼接 SQL 风险范围清单
> 梳理日期:2026-09-17
> 更新:同日已完成 **P0 / P1 / 单点 LIMIT** 修复;**全局 orderBy 列白名单暂不改**。
## 已修复(本次)
| 原优先级 | 项 | 处理 |
|----------|----|------|
| P0 | `RsSystemMapper` `${sql}` + `SqlUpdateController` + `SqlScriptRunner` + `DbInitializer` | 已删除 |
| P0 | 招生 `ZsjyEnrollmentInfoMapper` `${*Condition}` | 已去掉 `${}` 条件参数;VO 删除 `extraCondition` |
| P1 | 宿舍 `managerType` 字符串拼接 | 已改为 JDBC `?` |
| P2 | 学生搜索 `LIMIT + limit` | 已改为 `Page` 安全分页 |
| P2 | bucket 访问记录 LIMIT | 已改为 `Page` 安全分页 |
| P2 | 违纪 `limit ${(pageNum-1)*pageSize}` | 已改为 `#{offset}`/`#{pageSize}`,Service 计算 offset |
| P2 | 心理咨询详情 Long 拼接 | 已改为 `?` 占位 |
另:`tenantId` 注入、debug 任意 SQL 接口此前已修。
## 暂不改造
| 级 | 项 | 说明 |
|----|----|------|
| P2 | 全局 `PageQuery.orderByColumn` | 现有正则已基本挡住经典注入;列名白名单属加固,影响面大 |
| P3 | 会话 userId/deptId 的 `exists`/`inSql` | 面窄,可后续顺手改 |
| P3 | 其它已用 `?` 的手写 JdbcTemplate | 维护面问题,非紧急注入 |