Skip to content

fix(0.x): decode __proto__ map keys as own properties in Cbor.decode - #581

Merged
jxom merged 1 commit into
0.xfrom
fix/cbor-proto-map-key-0.x
Nov 8, 2026
Merged

jxom merged 1 commit into
0.xfrom
fix/cbor-proto-map-key-0.x

Conversation

@jxom

@jxom jxom commented Nov 8, 2026

Copy link
Copy Markdown
Member

Backports #573 from main to 0.x, so the 0.14.x line gets it.

Cbor.decode built maps with result[key] = value, so a __proto__ key went through the Object.prototype.__proto__ setter. An object or null value replaced the decoded object's prototype, and any other value was dropped. The decoder now defines __proto__ as an own enumerable property, as JSON.parse does, for both definite and indefinite-length maps.

Differences from main: none in the source. The new test is formatted with Biome, which 0.x uses.

Local checks

  • vitest --project core on Cbor, CoseKey and webauthn: 265 tests passed
  • pnpm check:types: passed
  • biome check on the changed files: passed

Original author: @RaphaelFakhri. Fixes #572 on 0.x.

@vercel

vercel Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ox Error Error Nov 8, 2026 7:59pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T19:49:41.423916Z 4692639 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Published ox@0.0.0-pr-581-4692639 under the pr-581 dist-tag, which follows this pull request until it closes.

pnpm add ox@pr-581
pnpm add ox@0.0.0-pr-581-4692639

@jxom
jxom merged commit 0dcd096 into 0.x Nov 8, 2026
13 of 14 checks passed
@jxom
jxom deleted the fix/cbor-proto-map-key-0.x branch November 8, 2026 19:54
@github-actions github-actions Bot mentioned this pull request Nov 8, 2026

This branch had an error being deployed

1 failed deployment
Preview — 46926395 Deployed Nov 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants