secret-cipher.test.ts fails on Node 26 linked against OpenSSL 4.1
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- nodejs, typescript
- Domain
- backend
Research direction
The failing assertions are in apps/api/src/core/tests/secret-cipher.test.ts at lines 28-33 and 45-52. The decryption logic is in apps/api/src/core/secret-cipher.ts, where decipher.final() throws. Run pnpm exec vitest run on the test file under Node 26 with OpenSSL 4.1 to see the new 'bad decrypt' message. Done when the test passes on both OpenSSL 3.x and 4.x, either by wrapping the authentication failure in decryptSecret or by matching both error strings.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 119
- Forks
- 19
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 61
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DouglasNeuroInformatics/OpenDataCapture
-
Area: Infrastructure Bug Difficulty: Low Priority: Medium Security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DouglasNeuroInformatics/OpenDataCapture#1916 ·
Maintainers usually reply within 1 day
-
Area: Infrastructure Chore Difficulty: Low Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DouglasNeuroInformatics/OpenDataCapture#1835 ·
Maintainers usually reply within 1 day
-
Area: Instruments Bug Difficulty: Low Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DouglasNeuroInformatics/OpenDataCapture#1824 · 1 comment ·
Maintainers usually reply within 1 day
-
Completing a series instrument logs a TypeError "Cannot read properties of undefined (reading 'kind')"Possibly taken @SAY-5 claimed this 3 days ago. OpenArea: Shared Bug Difficulty: Low Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DouglasNeuroInformatics/OpenDataCapture#1813 · 1 comment ·
Maintainers usually reply within 1 day
-
Multiple instructions show as one comma-joined paragraph ("questions., Conditional")Possibly taken @Sanilas-ai claimed this 22 days ago. OpenArea: Shared Bug Difficulty: Low Good First Issue Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DouglasNeuroInformatics/OpenDataCapture#1812 · 1 comment ·
Maintainers usually reply within 1 day
All issues in DouglasNeuroInformatics/OpenDataCapture
Similar issues
-
iOS: Clear Context (/clear) and model picker fallback use negative agent check instead of isClaudeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
agent-canvas bug oh-gpt-fleet priority:medium ready-for-dev UI/UX
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
documentation good first issue priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
TMHSDigital/steam-mcp#95 ·
-
good first issue javascript test
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 2 days