fix: improve request config handling#11001
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 13 files
Confidence score: 3/5
- In
lib/adapters/http.js, auth credential normalization appears regressed soundefined/nullown properties inauthmay be serialized as literal strings, which can produce invalid Basic credentials and cause authentication failures for affected requests — restore empty username/password normalization (or equivalent guard) and add a regression test before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
shaanmajid
pushed a commit
to shaanmajid/axios
that referenced
this pull request
Jul 16, 2026
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
Testing
Note
Summary by cubic
Hardened request config handling and form serialization. We now ignore inherited options, cap form depth, normalize blank Basic Auth credentials, and treat
0.0.0.0as local for proxy bypass.Description
auth,paramsSerializer,proxy, anddatain HTTP/XHR adapters and alias methods.toFormDataandformDataToJSON; throwAxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED.buildURLto accept a function or options object; ignore inheritedencode/serialize.0.0.0.0as loopback inshouldBypassProxy.Authorizationheader when credentials are blank.Docs
ERR_FORM_DATA_DEPTH_EXCEEDED.paramsSerializercan be a function or an options object.auth.username/auth.passworddefault to empty strings when nullish.0.0.0.0is treated as local inno_proxymatching.Testing
test/specs/__helpers.js: normalize nullish Basic Auth in XHR.test/unit/adapters/http.js: nullish Basic Auth, no inheritedauth/proxy/paramsSerializerafter cloning,0.0.0.0bypass.test/unit/core/prototypePollution.js: alias methods don’t inheritdata.test/unit/helpers/buildURL.js: ignore inherited serializer options.test/unit/helpers/formDataToJSON.js: depth limit and basic conversion.test/unit/helpers/shouldBypassProxy.js:0.0.0.0bypass behavior and port matching.test/unit/helpers/toFormData.js: depth limit including meta-token paths.Semantic version impact
Patch: bug fixes and hardening with no API changes. The new error only triggers on excessive depth; Basic Auth normalization aligns with expected behavior.
Written for commit 04586c5. Summary will update on new commits.