fix: Fix header merging case-sensitivity issue - #1238
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1238 +/- ##
==========================================
+ Coverage 79.56% 79.94% +0.37%
==========================================
Files 515 515
Lines 18926 19287 +361
Branches 9056 9413 +357
==========================================
+ Hits 15059 15419 +360
- Misses 3867 3868 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
frederikprijck
approved these changes
Nov 4, 2025
kushalshit27
approved these changes
Nov 5, 2025
Merged
5 tasks
5 tasks
harshithRai
pushed a commit
to tsushanth/node-auth0
that referenced
this pull request
Jul 16, 2026
Closes auth0#1330. The internal fetcher layer added `BaseClientOptions.fetch?: typeof fetch` in auth0#1238 and routes it through `fetcherImpl(args.fetchFn ?? …)`. The public wrapper, however, both omitted `fetch` from `ManagementClientOptions` and explicitly deleted it from the incoming options bag, so library consumers had no supported way to provide their own HTTP transport — even though the SDK is already capable of using one. - Drop `"fetch"` from the `Omit<FernClient.Options, …>` list so the field is part of the public surface. - Stop deleting `_options.fetch` in the `ManagementClient` constructor. The internal `fetcher` is still stripped (it's a Fern implementation detail), with a comment explaining why. Adds a focused test in `tests/management/ManagementClient.test.ts` that constructs a `ManagementClient` with a custom `fetch`, fires a request, and asserts the custom implementation was invoked against the expected URL. Also covers the no-`fetch` happy path to make sure the default global-fetch route is unchanged.
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.
Changes
This PR fixes a critical security issue with header merging:
Header Merging Security Fix (Fixes #1228)
mergeHeadersandmergeOnlyDefinedHeadersnow normalize header names to lowercaseAuthorization) by using different casingAuthorizationandauthorizationare treated as the same headerFern Auto-Generated Changes
References
Testing
Checklist