create: U-03 对话密码锁键不含 IP
MemRelay-Operation: memory-save:u03-decision-talk-lock-key-20260930 MemRelay-Resource: f6893f51-1f95-480c-9038-84eab43afb72
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: Checkpoint 2026-09-30 07:33:32 UTC [01dfe35b7a]
|
||||
type: checkpoint
|
||||
permalink: main/projects/25464650-ed5d-440e-b362-190f2852d451/checkpoint-2026-09-30-07-33-32-utc-01dfe35b7a
|
||||
stable_id: 5ad2d6bb-cc23-47b9-8520-ca169019d1b5
|
||||
scope: project
|
||||
memory_type: checkpoint
|
||||
project_id: 25464650-ed5d-440e-b362-190f2852d451
|
||||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||
status: active
|
||||
revision: 1
|
||||
request_id: u03-checkpoint-20260930-a0a24b2
|
||||
created_at: '2026-09-30T07:33:33.569308+00:00'
|
||||
updated_at: '2026-09-30T07:33:33.569308+00:00'
|
||||
tags:
|
||||
- ready-to-merge
|
||||
- U-03
|
||||
- lane/identity
|
||||
- review-fix
|
||||
---
|
||||
|
||||
## 检查点:身份线复审 U-03 完成(未 merge main)
|
||||
|
||||
## 线 / 任务
|
||||
- 线:身份 / 对话密码锁定
|
||||
- 任务:U-03(Gitea #41)
|
||||
- 分支:`feat/fix-u03-talk-lock`(已普通推送到 origin,未强推、未合 main)
|
||||
- 工作树:`E:\\code\\NixMsg-wt\\r2-u03`
|
||||
- **未 merge main**;未关 issue;未改 emit;未修 H-02
|
||||
|
||||
## 基线与合并
|
||||
1. `git worktree add -b feat/fix-u03-talk-lock E:\\code\\NixMsg-wt\\r2-u03 origin/feat/fix-u02-group-tx`(含 C-04/C-05 submit.go、U-02 group tx)
|
||||
2. `git merge origin/feat/fix-identity-u01-u05` → 干净(含 U-04 locks.go 过期清理)
|
||||
3. `git merge origin/feat/fix-admin-web` → 干净(H 的 endpoints.go;**未**合本地 r2-h 上可能已有的 H-02 `afe6a77`,按指令用 origin/feat/fix-admin-web)
|
||||
- 冲突:无。DEVIATIONS 自动合并双方追加;group/app.go、submit.go、endpoints.go、locks.go 无冲突,未删别人修复。
|
||||
|
||||
## 提交
|
||||
- 合并提交:`73408ab` merge: identity u01-u05;`c15e8dc` merge: admin-web
|
||||
- U-03:`a0a24b29b0f0f7a3b7e2743521b6fa8b5eac313a` fix: 统一对话密码锁键为发送方加对方不含 IP
|
||||
|
||||
## 完成内容(issue 统一方案)
|
||||
1. `LockTalkPair` 键统一为 `{Kind, 发送方, 对方}`,**不含 IP**。unlock / send / 进群 / 成功清零共用。`UnlockTalk`/`CheckTalkPasswordForJoin` 仍留 `remoteIP` 以免改接线签名。group `checkAddMember` 仍传 `DefaultRemoteIP`,identity 侧忽略。
|
||||
2. 没带密码先返回 `talk_password_required`,不计次、不因已锁改成 `rate_limited`;带错才 Fail;已锁且带密码才 `rate_limited`。
|
||||
3. 后台 `PUT talk-password`:有 Identity 时调 `SelfSetTalkPassword`(已清 `LockTalkTarget`,not_found→404);无 Identity 时改库后 `Clear(LockTalkTarget)`。
|
||||
4. `LoginLocks.ClearAllForEndpoint`:删该编号作为 EndpointID 或 PeerID 的全部锁定。`identity.Delete` 与无 Identity 的 admin 删除都会调用。`ClearEndpoint` 仍只清登录锁(admin memlock 已对齐)。
|
||||
5. `docs/DEVIATIONS.md` 身份 I 节追加 `### 复审修复 U-03`。
|
||||
|
||||
## 验证
|
||||
`go test ./internal/app/identity/ ./internal/app/group/ ./internal/app/message/ ./internal/admin/ ./internal/auth/ -count=1` 一次通过(identity 1.1s / group 0.18s / message 0.30s / admin 2.8s / auth 0.17s)。
|
||||
|
||||
## 未做 / 给下个会话
|
||||
- 不要 merge main;不要强推 main。
|
||||
- 不要改 group `emit`;不要修 H-02。
|
||||
- 总控可审阅后 ff-only 合 `feat/fix-u03-talk-lock`(建议在 U-02、identity u01-u05、admin-web 之后,因本分支已把它们 merge 进来)。
|
||||
- 不要删 `E:\\code\\NixMsg-wt\\fix3`。
|
||||
- 标签:ready-to-merge
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: U-03 对话密码锁键不含 IP
|
||||
type: decision
|
||||
permalink: main/projects/25464650-ed5d-440e-b362-190f2852d451/u-03-对话密码锁键不含-ip
|
||||
stable_id: f6893f51-1f95-480c-9038-84eab43afb72
|
||||
scope: project
|
||||
memory_type: decision
|
||||
project_id: 25464650-ed5d-440e-b362-190f2852d451
|
||||
usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998
|
||||
status: active
|
||||
revision: 1
|
||||
request_id: u03-decision-talk-lock-key-20260930
|
||||
created_at: '2026-09-30T07:33:31.769372+00:00'
|
||||
updated_at: '2026-09-30T07:33:31.769372+00:00'
|
||||
tags:
|
||||
- U-03
|
||||
- LockTalkPair
|
||||
- talk-lock
|
||||
---
|
||||
|
||||
U-03(Gitea #41,2026-09-30)已确认做法:对话密码失败计数键统一为 `{LockTalkPair, 发送方, 对方}`,不带 IP。没带密码返回 talk_password_required 且不计次;只有带错密码才 Fail;锁定期间带密码的 unlock/send/进群返回 rate_limited。后台改密走 identity.SelfSetTalkPassword 清 LockTalkTarget。删除端 ClearAllForEndpoint,避免同编号重开继承锁定。ClearEndpoint 仍只清登录锁。
|
||||
Reference in New Issue
Block a user