GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [v7.x] fix(decompress): treat inherited Object.prototype names as unsupported encodings (#5807) by mrityunjay-pandey · Pull Request #6024 · nodejs/undici

Conversation

@mrityunjay-pandey

@mrityunjay-pandey mrityunjay-pandey commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This relates to...

Backport of #5807 to v7.x.

Rationale

supportedEncodings in lib/interceptor/decompress.js is a plain object literal on v7.x too, so Content-Encoding: constructor or __proto__ resolves through the prototype chain. With the tests from #5807 applied to v7.x, the constructor and gzip, constructor cases never settle and __proto__ throws out of the interceptor (3 failing tests, the run hits the timeout).

Changes

  • Clean cherry-pick of ca5111e (git cherry-pick -x), no conflicts: __proto__: null on the encodings table, plus the tests from fix(decompress): treat inherited Object.prototype names as unsupported encodings #5807.

Features

N/A

Bug Fixes

  • The decompress interceptor passes through Object.prototype names as unsupported encodings instead of hanging or throwing.

Breaking Changes and Deprecations

N/A

Status

  • I have read and agreed to the Developer's Certificate of Origin
  • Tested
  • Benchmarked (optional)
  • Documented
  • Review ready
  • In review
  • Merge ready

Tested locally on Linux with Node 24: node --test test/interceptors/decompress.js (48 pass), npm run lint and npm run test:unit (1324 tests, 1321 pass, 3 skipped, 0 fail).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@NgoQuocViet2001 @mrityunjay-pandey
fix(decompress): treat inherited Object.prototype names as unsupporte…
b986a7a
…d encodings (nodejs#5807)

supportedEncodings is a plain object literal, so the guard

  if (!supportedEncodings[encoding])

resolves inherited names through the prototype chain instead of rejecting
them. onResponseStart lowercases the header first, which leaves exactly two
reachable from the wire: constructor and __proto__.

A response carrying Content-Encoding: constructor calls Object(), pushes the
plain object it returns into the decompressor chain, and the request then
never settles; __proto__ throws TypeError out of the interceptor. Give the
table a null prototype so only its own entries can match.

(cherry picked from commit ca5111e)
@codecov-commenter

codecov-commenter commented Oct 15, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.17%. Comparing base (14c296f) to head (c687fe8).

Additional details and impacted files
@@           Coverage Diff           @@
##             v7.x    #6024   +/-   ##
=======================================
  Coverage   93.16%   93.17%           
=======================================
  Files         112      112           
  Lines       37632    37633    +1     
=======================================
+ Hits        35059    35063    +4     
+ Misses       2573     2570    -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 15, 2026
[v7.x] fix(decompress): join a repeated content-encoding header (#5664) #6026
Merged
ci: use Python 3.14 for the WPT server on macOS #6029
Merged
metcoder95
metcoder95 approved these changes Oct 16, 2026
View reviewed changes
@mrityunjay-pandey
Merge branch 'v7.x' into backport/v7.x-decompress-proto
c687fe8
@mrityunjay-pandey mrityunjay-pandey mentioned this pull request Oct 21, 2026
[v7.x] ci: use Python 3.14 for the WPT server on macOS (#6029) #6069
Merged
3 of 7 tasks

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@metcoder95 metcoder95 metcoder95 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mrityunjay-pandey @codecov-commenter @metcoder95 @NgoQuocViet2001
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.