secret-cipher.test.ts fails on Node 26 linked against OpenSSL 4.1
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- nodejs, typescript
- 领域
- backend
调研方向
失败的断言位于 apps/api/src/core/tests/secret-cipher.test.ts 的第 28-33 行和第 45-52 行。解密逻辑位于 apps/api/src/core/secret-cipher.ts,其中 decipher.final() 会抛出异常。在 Node 26 和 OpenSSL 4.1 环境下对该测试文件运行 pnpm exec vitest run,以查看新的 'bad decrypt' 消息。完成标准是测试在 OpenSSL 3.x 和 4.x 上都能通过,可以通过在 decryptSecret 中包装认证失败,或让两个错误字符串都能匹配来实现。
由索引模型根据 Issue 内容生成。
描述
apps/api/src/core/__tests__/secret-cipher.test.ts asserts the exact OpenSSL 3.x error string 'Unsupported state or unable to authenticate data' when AES-256-GCM decryption fails authentication in two tests:
decryptSecret > should throw when the key differs, which is what a rotated SECRET_KEY looks like(apps/api/src/core/__tests__/secret-cipher.test.ts:28-33)decryptSecret > should throw when the ciphertext has been tampered with(apps/api/src/core/__tests__/secret-cipher.test.ts:45-52)
Under Node v26.13.1 linked against OpenSSL 4.1.0 (which satisfies root package.json "engines": { "node": "^24.22.1 || >=26.12.1" }), decipher.final() throws:
Error: error:1C800064:Provider routines::bad decrypt
instead of 'Unsupported state or unable to authenticate data', failing pnpm test:coverage.
Reproduction
On a host with Node v26.13.1 (process.versions.openssl === '4.1.0'), run:
pnpm exec vitest run apps/api/src/core/__tests__/secret-cipher.test.ts
Possible fix
Either normalize decipher.final() authentication failures in decryptSecret (apps/api/src/core/secret-cipher.ts) into an application error message independent of the underlying OpenSSL build, or match both OpenSSL 3.x and OpenSSL 4.x GCM authentication error messages in secret-cipher.test.ts.
- 主要语言
- TypeScript
- 星标
- 119
- 派生
- 19
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 61
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DouglasNeuroInformatics/OpenDataCapture 的其他 Issue
-
Area: Infrastructure Bug Difficulty: Low Priority: Medium Security
难度 2/5 1-3 小时 新手友好度 72/100
DouglasNeuroInformatics/OpenDataCapture#1916 ·
维护者通常 1 天内回复
-
Area: Infrastructure Chore Difficulty: Low Priority: Medium
难度 2/5 1-3 小时 新手友好度 70/100
DouglasNeuroInformatics/OpenDataCapture#1835 ·
维护者通常 1 天内回复
-
Area: Instruments Bug Difficulty: Low Priority: Low
难度 2/5 1-3 小时 新手友好度 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 · 1 条评论 ·
维护者通常 1 天内回复
-
Completing a series instrument logs a TypeError "Cannot read properties of undefined (reading 'kind')"可能已有人在做 @SAY-5 于 3 天前认领。 未关闭Area: Shared Bug Difficulty: Low Priority: Low
难度 2/5 1-3 小时 新手友好度 70/100
DouglasNeuroInformatics/OpenDataCapture#1813 · 1 条评论 ·
维护者通常 1 天内回复
-
Multiple instructions show as one comma-joined paragraph ("questions., Conditional")可能已有人在做 @Sanilas-ai 于 22 天前认领。 未关闭Area: Shared Bug Difficulty: Low Good First Issue Priority: Low
难度 2/5 1-3 小时 新手友好度 78/100
DouglasNeuroInformatics/OpenDataCapture#1812 · 1 条评论 ·
维护者通常 1 天内回复
查看 DouglasNeuroInformatics/OpenDataCapture 的全部 Issue
相似的 Issue
-
iOS: Clear Context (/clear) and model picker fallback use negative agent check instead of isClaude未关闭
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
agent-canvas bug oh-gpt-fleet priority:medium ready-for-dev UI/UX
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
documentation good first issue priority: low
难度 2/5 1-3 小时 新手友好度 82/100
TMHSDigital/steam-mcp#95 ·
-
good first issue javascript test
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 2 天内回复