Repository navigation
docs: clarify redact, browser size limits and formToJSON collisions - #11419
Merged
Merged
Conversation
Document three existing behaviours in the README and the English, Spanish, French and Chinese docs site: - redact does not scan values that serialize through their own toJSON() (URL objects, class instances with toJSON()) or credentials inside URL strings; listing the parent key masks the whole value. - maxContentLength and maxBodyLength are enforced by the Node.js HTTP and fetch adapters, not by the XHR adapter; use the fetch adapter to cap response size in browsers. - formToJSON() combines colliding field names: repeated names become arrays and a plain value is lost when the same name is also a parent path, so validate the returned object rather than the FormData.
Contributor
[Low impact] This documentation-only PR appears safe to merge. SummaryClarifies existing behavior without changing runtime code.
Both previous findings are fully addressed. No new actionable issues were found. Reviews (2) · Last reviewed commit: "docs: narrow redact toJSON note, qualify..." · Reviewed by Greptile |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…dence - redact: plain objects (even with toJSON()) and AxiosHeaders are still scanned; only other objects with a toJSON() method, such as URL objects, are serialized as-is. - Size limits: the fetch adapter enforces maxContentLength and maxBodyLength only when it can determine the size or track the stream; link to the fetch adapter section. - formToJSON(): collisions between a plain value and a parent path depend on field order; document the reverse-order result. - Add the PR link to the prerelease changelog entry.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 18 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
7 of 9 tasks
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Nov 17, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [axios](https://axios-http.com) ([source](https://github.com/axios/axios)) | [`1.21.0` → `1.21.1`](https://renovatebot.com/diffs/npm/axios/1.21.0/1.21.1) |  |  | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/2097) for more information. --- ### Release Notes <details> <summary>axios/axios (axios)</summary> ### [`v1.21.1`](https://github.com/axios/axios/releases/tag/v1.21.1) [Compare Source](axios/axios@v1.21.0...v1.21.1) #### v1.21.1 — November 9, 2026 This release raises the minimum `follow-redirects` version to fix a published CVE, fixes a Next.js prerendering failure caused by the response duration timer, corrects the `getAdapter` typings, and includes documentation corrections, new test coverage, CI runner changes and dependency updates. #### 🔒 Security Fixes - **follow-redirects:** Raised the `follow-redirects` range from `^1.16.0` to `^1.16.2` to fix CVE-2026-116689 (GHSA-mrwp-f3q8-3g9p). In the vulnerable versions, `sensitiveHeaders` arrays from another realm were ignored and custom credentials could follow redirects. Only the Node.js HTTP adapter is affected, and there are no API changes. (**[#​11410](axios/axios#11410) #### 🐛 Bug Fixes - **Response Duration:** `dispatchRequest` now measures `response.duration` with `performance.now()` and uses `Date.now()` only when `performance.now()` isn't available. In v1.21.0, any axios request from a Server Component failed Next.js production builds with Cache Components (`cacheComponents: true`), because Next.js rejects `Date.now()` while prerendering. The duration is still a whole number of milliseconds, and system clock changes no longer affect it. (**[#​11411](axios/axios#11411) - **TypeScript:** `getAdapter` now accepts an optional `config?: AxiosRequestConfig` in `index.d.ts` and `index.d.cts`, matching what it does at runtime. You can now call `getAdapter('fetch', { env: { fetch: myFetch } })` without a cast. (**[#​11404](axios/axios#11404) #### 🔧 Maintenance & Chores - **Documentation Corrections:** Brought the README and docs site in line with how axios actually behaves: - `transformRequest` runs for every method, and transformers receive `(data, headers, status)`. - `responseType` and `Content-Type` have no default value. - `AxiosHeaders#get` and `#normalize` are described correctly. - Errors should be identified with `axios.isAxiosError()`, not by `name`. - The error tables now list `ECONNREFUSED` and `ERR_FORM_DATA_DEPTH_EXCEEDED`, and note that FormData parsing has a fixed depth limit that `maxDepth` doesn't change. - New notes cover what `redact` doesn't scan, which adapters enforce `maxContentLength` / `maxBodyLength`, and how `formToJSON()` handles field name collisions. (**[#​11374](axios/axios#11374, **[#​11373](axios/axios#11373, **[#​11389](axios/axios#11389, **[#​11419](axios/axios#11419, **[#​11429](axios/axios#11429, **[#​11430](axios/axios#11430) - **Docs Site:** Added a Partners page, a shared card design for sponsors and partners, a Namespace sponsor badge, and a blog whose first post announces HeroDevs Never-Ending Support for Axios v0. Also applied the v1.20.0/v1.21.0 release notes to the docs, and fixed internal links in the es, fr and zh translations so they keep their locale prefix. (**[#​11390](axios/axios#11390, **[#​11399](axios/axios#11399, **[#​11400](axios/axios#11400, **[#​11412](axios/axios#11412, **[#​11401](axios/axios#11401) - **Test Coverage:** Added cancellation tests across the HTTP, fetch and XHR adapters. They cover `AbortSignal`, `CancelToken`, cancelling while a request interceptor is pending, and timeout precedence. Also added tests for `no_proxy` edge cases in `shouldBypassProxy`, such as internationalized domain names, malformed CIDR and IPv4 entries, and port-qualified entries. Neither changes runtime behavior. (**[#​11376](axios/axios#11376, **[#​11431](axios/axios#11431) - **CI:** GitHub Actions jobs now run on Namespace runners. The npm publish job stays on GitHub-hosted runners, because npm provenance and trusted publishing (OIDC) only work there. (**[#​11396](axios/axios#11396) - **Dependencies:** Updated development and tooling dependencies, including `vitest` and `@vitest/*` (to 5.x at the root), `typescript` (7.x at the root), `vite`, `rollup`, `eslint`, `playwright`, `@commitlint/*`, `@rollup/plugin-alias`, `@rollup/plugin-terser`, `body-parser`, `multer`, `serialize-javascript`, `fast-uri`, `qs`, `zizmorcore/zizmor-action`, and `follow-redirects` in `/docs`. (**[#​11383](axios/axios#11383, **[#​11375](axios/axios#11375, **[#​11372](axios/axios#11372, **[#​11345](axios/axios#11345, **[#​11392](axios/axios#11392, **[#​11387](axios/axios#11387, **[#​11386](axios/axios#11386, **[#​11385](axios/axios#11385, **[#​11391](axios/axios#11391, **[#​11388](axios/axios#11388, **[#​11395](axios/axios#11395, **[#​11421](axios/axios#11421, **[#​11422](axios/axios#11422, **[#​11426](axios/axios#11426) - **Release:** Prepared the 1.21.1 release. (**[#​11435](axios/axios#11435) #### 🌟 New Contributors We are thrilled to welcome our new contributors. Thank you for helping improve axios: - **[@​Ghoscro](https://github.com/Ghoscro)** (**[#​11374](axios/axios#11374) - **[@​pei711](https://github.com/pei711)** (**[#​11373](axios/axios#11373) - **[@​ivanhapaz](https://github.com/ivanhapaz)** (**[#​11399](axios/axios#11399) - **[@​aelmanaa](https://github.com/aelmanaa)** (**[#​11404](axios/axios#11404) - **[@​Aryapatel-007](https://github.com/Aryapatel-007)** (**[#​11429](axios/axios#11429, **[#​11430](axios/axios#11430) - **[@​umair-ghafoor-ai](https://github.com/umair-ghafoor-ai)** (**[#​11376](axios/axios#11376) - **[@​yxshee](https://github.com/yxshee)** (**[#​11389](axios/axios#11389) - **[@​malinele](https://github.com/malinele)** (**[#​11401](axios/axios#11401) - **[@​AnantDuhan](https://github.com/AnantDuhan)** (**[#​11431](axios/axios#11431) [Full Changelog](axios/axios@v1.21.0...v1.21.1) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2336
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Documents three existing behaviours that the docs either left out or described more broadly than the code behaves. Nothing at runtime changes.
redact: the docs say matching works "at any depth" and is "recursive". In practice, plain objects (even ones that definetoJSON()), arrays, class instances andAxiosHeadersare scanned, but any other object with atoJSON()method is serialized as-is and never scanned. That coversURLobjects and class instances that definetoJSON(). Credentials inside URL strings aren't matched either, becauseredactmatches key names. Listing the parent key (for exampleauthorproxy) masks the whole value.maxContentLength/maxBodyLengthfor untrusted servers, without saying which adapters enforce them. The Node.js HTTP adapter enforces them, the fetch adapter enforces them when it can determine the size or track the stream, and the XHR adapter, the browser default, does not.formToJSON()collisions: field names are paths, so colliding names are combined. A repeated name becomes an array. When the same name is also used as a parent path, the result depends on field order:account=standardfollowed byaccount[role]=admingives{ account: { role: 'admin' } }and loses the plain value, while the reverse order gives{ account: [{ role: 'admin' }, 'standard'] }. Applications that validate submitted fields should check the converted object, not the originalFormData.Linked issue
None. These are clarifications of current behaviour, found while reviewing how
redact, the adapter size limits andformToJSON()behave in practice.Changes
redact: added thetoJSON()passthrough, URL-string and parent-key notes to the request config entry, the error handling guide, the security page's option table and the README error-handling section.maxContentLength/maxBodyLength, the fetch adapter enforces them when it can determine the size or track the stream (linking to the fetch adapter section), and XHR doesn't. It recommendsadapter: 'fetch'for browsers, subject to the same conditions. ThemaxContentLengthrequest config entry notes that XHR doesn't enforce it.formToJSON(): added a collision note to "Converting FormData back to JSON" (docs site) and "Converting FormData to JSON" (README).PRE_RELEASE_CHANGELOG.md: added a Documentation entry.Validation
v1.xHEAD (7324e94) with a local Node.js 24.21.0 script that callsAxiosError#toJSON()andaxios.formToJSON()directly:redact: ['password']maskspasswordinside a plain class instance. It doesn't mask it inside a class instance withtoJSON(), aURLpassed asproxy, or aurlstring with userinfo.redact: ['auth']andredact: ['proxy']mask the whole value.toJSONand anAxiosHeadersinstance are both still scanned (passwordandAuthorizationare masked).formToJSON()gives{"account":{"role":"admin"}}foraccount=standard+account[role]=admin, and{"account":["standard","admin"]}for a repeatedaccount, and{"account":[{"role":"admin"},"standard"]}whenaccount[role]comes first.grepshowslib/adapters/xhr.jscontains no reference tomaxContentLengthormaxBodyLength.npx prettier --checkon every changed file:PRE_RELEASE_CHANGELOG.mdand the fourmultipart-form-data-format.mdfiles pass. The other changed files already failed Prettier onv1.xbefore this change, and I left them as they were to avoid unrelated reformatting. None of them gained new formatting issues.git diff --check: no whitespace errors.docs/dependencies are not installed in this checkout and the change adds no new pages, links or components.redactexception, conditional fetch limits, order-dependentformToJSON()collisions, and the changelog PR link.Compatibility and documentation
No semver impact: documentation only, with no runtime, public API or type changes.
index.d.ts/index.d.ctsdon't need updates. These behaviours are already released, so the docs are updated directly and nothing needs to be added toPRE_RELEASE_DOCS.md.Checklist
PRE_RELEASE_CHANGELOG.mdentry added or updated (or AGENTS.md's automated release-preparation exception explained)🤖 Generated with Claude Code