群主转让加一步密码二次确认,跟账号注销/改密码等其它高风险操作保持一致(第6章复测发现)

serveIMGroupOwnerTransfer 核实过:只认 {target_user_id, version},没有任何
action_token/二次验证机制——不是文档滞后,是这个操作本身就没有服务端强制的二次
确认。但转让群主同样不可逆、后果同样重大("确定后你将立即失去群主身份"),本项目
对同一类场景已有明确先例:personal-settings-view.jsx 的 DeleteAccountConfirm 就是
纯前端加的密码输入门槛,不指望服务端校验它,只是让"手滑点确定"变成需要多打一遍
密码才会发生的事。

OwnerSelect 原来点目标人选后只有一层"确定/取消"的确认表,点确定直接调用真实转让
接口。现在拆成两步:第一步维持原有确认文案不变,第二步新增密码输入,留空点确定
会被拦下(不发请求),填了任意内容才真正调用 transferGroupOwner。

真实验证(真实群+真实候选人):空密码点确定确认没有发出请求;填入密码后
transferGroupOwner 真实调用成功,正确跳转回群组管理页。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-09-04 17:04:26 +08:00
co-authored by Claude Opus 5
parent 542aca3dc2
commit 7728afe79f
4 changed files with 73 additions and 8 deletions
+11
View File
@@ -9513,6 +9513,17 @@ div.toast.show {
line-height: 1.6;
}
.group-password-input {
width: 100%;
height: 2.75rem;
margin-top: 0.6rem;
padding: 0 0.9rem;
border: 1px solid #dde1e6;
border-radius: 0.35rem;
font-size: 1rem;
text-align: left;
}
.people-confirm-sheet button,
.group-source-sheet button,
.group-confirm-sheet button {