Repository navigation
fix: 设密凭据写库成功后再消费 · 回跳地址解析 · 桌面端重启更新提示 · 清空 updateUrl 回落默认源(#437) - #438
Merged
Merged
Conversation
yile2020
enabled auto-merge
November 21, 2026 23:54
yile2020
force-pushed
the
fix/issue-437
branch
from
November 22, 2026 00:06
5c2ea9b to
b00013f
Compare
…回落默认源(#437) - 无密码账号第一次设密码:凭据不再在写库前 GETDEL。另一把 key 上 SET NX 占位(并发只有一个拿得到), 写库抛错同步放开占位、提交失败由会话最外层回滚钩子放开,提交成功后后台任务删凭据 - profile_security_url 用 urlsplit / parse_qsl 设 section,已带 section= 或 # 时不再落错面板 - 桌面端:主进程记下已下载的版本、新 IPC updater:downloaded;quitAndInstall 拿不到更新器时抛错; 渲染层根上挂 DesktopUpdatePrompt,下载好后弹不自动消失的「重启更新」,失败报错可重试(中英文案) - 运行中把 updateUrl 清空:autoUpdater.updateConfigPath = null,下次检查重读 app-update.yml - 分支合入了 origin/main(#435 的桌面端改动),本 PR 依赖 #431 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…不上更新要报错 · 登录落地页解析设参数(#437) - 🔴 finish(提交后删设密凭据)排在撤全部会话的后台任务前面,Redis 一抛 Starlette 就跳过后面的任务, 偷来 token 的会话活过了改密码;现在吞异常记日志 - 占位原来固定 30 秒,写库卡过 30 秒时同一会话的第二个请求能再占、两次都写进去;改成一段 Lua 读凭据 PTTL 再 SET NX PX - 占位被同会话另一请求拿着时回 error.user.password_set_in_progress,不再回「请先重新验证身份」 - 写库失败时同步放开占位的 Redis 异常吞掉,抛出去的是写库那个错 - 桌面端:electron-updater 装不上(安装包没了 / doInstall 抛错)只发 error 事件不抛,quitAndInstall 期间接住并 reject; 加真 AppUpdater 的守卫测试,updateConfigPath = null 的语义变了就红 - 登录落地页(失败原因 / MFA 第二步)同样是字符串拼接,改走 login_redirect_url() Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yile2020
force-pushed
the
fix/issue-437
branch
from
November 22, 2026 00:22
b00013f to
5cb3700
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #437
四条修法
1. 无密码账号设密码:凭据写库成功后再消费(并发仍只能用一次)
update_password在写库之前GETDEL,之后写库 / 提交失败凭据就没了,要重跑第三方授权password_set_grant.held()包住写密码那几句:另一把 key 上SET NX EX 30占位(并发只有一个占得到,凭据不动)→ 写库 + flushafter_soft_rollback钩子放开占位CurrentSessionTransaction先提交、后台任务后跑、回滚不跑)2.
profile_security_url用 URL 解析设参数urlsplit+parse_qsl去掉同名section再设;带#时参数放在 hash 前,hash 路由(#/profile)放进 hash 里。3. 桌面端「已下载,重启更新」
updater:downloaded/ 桥updater.downloaded()(渲染层后挂上时补问,事件可能早发过了)quitAndInstall()拿不到更新器时抛错(原来静默 no-op)shell/desktop-update.ts(纯逻辑)+desktop-update-prompt.tsx:不自动消失的 toast「新版本 x 已下载 / 重启更新」,失败弹错误 + 重试(硬纪律 9),中英文案;挂在apps/web/src/app.tsx根上(登录页也看得到)4. 运行中清空
updateUrl回落默认源清空时⚠️ 这个 setter 在 d.ts 里标 test only,升级 electron-updater 时要核对源码(已记进
autoUpdater.updateConfigPath = null,electron-updater 6.8 下次检查重读app-update.yml。apps/desktop/AGENTS.md)。测试(先红后修)
test_passwordless_set_password.py新增 3 条 + 参数化 7 组nx=True→ 红(两个都 200);去掉回滚钩子 → 「提交失败」红tests/updater.test.ts5 条,修之前 3 条红;桌面端 30 条全绿shell/desktop-update.test.ts4 条;变异(去掉补问 / 吞掉安装失败)各红一条pnpm typecheck --force·lint·arch:check·i18n:check·ctx:check·pnpm test:js全绿没验证
updateConfigPath = null后的那次检查(只读了源码)🤖 Generated with Claude Code