pallyoung
pallyoung
## 问题描述 `packages/web/src/ws/client.ts` 的 `handleClose()` 在 WebSocket 重连时,不清空以下 Map: - `orphanBinaryPayloads`(line 93) - `pendingReplayStreamIds`(line 88) 服务端每次新建 WsClient 实例时,`nextStreamId` 从 1 重新计数。重连后新连接的 `streamId=1` 帧会命中旧连接遗留在 Map 中的 entry,导致 replay 数据路由到错误的处理器,出现终端输出乱码或 replay promise...
## 问题描述 `terminal-panel.tsx` 处理 `terminal.created` WebSocket 事件时,只更新了终端 ID 列表(`setTerminalIds`、`setActiveTerminalId`),但未设置 `terminalMetaAtomFamily`。 XtermHost 的渲染守卫检查 `activeTerminalMeta`(来自 `terminalMetaAtomFamily`),若该值为 null,则终端面板不渲染。 ## 影响场景 - 用户在**第二个浏览器 tab** 中打开工作区,此时终端由另一个 tab 创建 - **Agent** 在后台创建终端 - 以上场景下,WS 事件到达但 meta...
## 问题描述 `packages/server/src/ws/hub.ts` 的 `handleClose()` 在客户端断开时未调用 `fencingMgr.release()`,导致 fencing token 泄漏。 代码注释称"FencingManager 还没有 releaseByClientId 的方法",但实际上 `FencingManager.release(workspaceId, clientId)` 已经存在。 ## 复现场景 1. Tab A 获取 controller 角色 2. Tab A 网络断开或浏览器崩溃(无法主动调用 `fencing.release`)...
## 问题描述 `packages/server/src/commands/terminal.ts` 第 180 行的 `console.log('[DEBUG] terminal.input command:', {...})` 遗留在生产代码中。 该日志在每次用户击键时触发,并将 `bufferPreview`(输入内容前 50 字节)打印到 stdout,可能泄漏密码、sudo token 等敏感信息。 ## 影响 - **安全风险**:终端输入(含密码)明文写入服务器日志 - **性能**:高频热路径(每次击键)同步写 console ## 相关代码 https://github.com/spencerkit/coder-studio/blob/490e555dcc7800be632c5b817bf1694e15c521ca/packages/server/src/commands/terminal.ts#L179-L188 ## 修复建议...
## Problem When a new client takes over an expired token in `FencingManager.requestControl()`, it deletes the expired token from `this.tokens` but does **not** clean up the old `clientId` entry from...
## Problem `packages/server/src/server.ts` (lines 345-366) — `createSessionDatabase` maps camelCase keys to snake_case columns at runtime using an `ALLOWED_COLS` whitelist. While the whitelist provides some safety, this is more fragile than...
## Problem `POST /auth/login` has no rate limiting. A brute-force attacker could try every password. For a local-only tool this risk is lower, but a simple in-memory rate limiter on...
## Critical Security Issues Found during review of `feature/refactor-ts` branch. ### 1. CORS allows all origins with credentials **File:** `packages/server/src/app.ts` (lines 64-69) ```typescript await app.register(cors, { origin: true, // Allow...
## react-navigation not support web platform i used the react-navigation at my web project with the version 1.0.0-beta.21,and it runs well,but when i try to upgrade it to the latest...
const lottieEntity: Entity = await engine.resourceManager.load({ urls: [ 'https://gw.alipayobjects.com/os/bmw-prod/b46be138-e48b-4957-8071-7229661aba53.json', 'https://gw.alipayobjects.com/os/bmw-prod/6447fc36-db32-4834-9579-24fe33534f55.atlas', ], type: 'lottie', }) 异常:Uncaught (in promise) TypeError: this.request is not a function