Repository navigation
fix!: exclude Brotli from default SentryOptions.DecompressionMethods - #5816
Merged
Merged
Conversation
The default was ~DecompressionMethods.None (equivalent to All), which enabled Brotli decoding on responses from the Sentry endpoint even though HttpClient leaves it off by default. CVE-2026-111497 lists that configuration as exposed. Default to GZip | Deflate instead; users who need Brotli can still opt in. Closes #5813 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## version7 #5816 +/- ##
============================================
+ Coverage 76.17% 76.21% +0.03%
============================================
Files 526 528 +2
Lines 19265 19307 +42
Branches 3729 3734 +5
============================================
+ Hits 14676 14715 +39
- Misses 3734 3735 +1
- Partials 855 857 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jamescrosswell
commented
Oct 27, 2026
ric-oliv
approved these changes
Oct 27, 2026
ric-oliv
left a comment
Member
There was a problem hiding this comment.
Nice, turning it off sounds good to me!
1 of 6 tasks
ric-oliv
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Oct 29, 2026
<!-- Keep the urgency section so automation can prioritize this PR. You may delete other sections you don't need. --> ## DESCRIBE YOUR PR This PR adds the migration guide for version 7 of the Sentry SDK for .NET, ready for the public release candidate, `7.0.0-rc.2`. It follows the pattern of the Flutter v10 guide from #19390: - A full guide at `/platforms/dotnet/migration/v6-to-v7/`, built from one include per change in `includes/migration/dotnet-v7/`. - An interactive checklist at `/platforms/dotnet/migration/v6-to-v7/interactive/` that renders the same includes through `<MigrationGuide migration="dotnet-v7" />`. - An agent prompt callout that points at the guide's `.md` URL. - A "Migrating to 7.x" section at the top of the existing .NET migration page, which links to both. Both pages live under `common/`, so they render for every .NET guide, such as ASP.NET Core, MAUI, WPF and Serilog. Xamarin uses a separate SDK, so the new pages exclude it. I didn't move the 6.x, 4.x and 3.x sections, so every existing URL and anchor keeps working and the PR needs no redirects. To register the collection, the PR adds `dotnet-v7` to the `MIGRATIONS` map in the `MigrationGuide` component and to the validator's `COLLECTIONS` map, with specs for both. These changes in `src/components/migrationGuide/` and `scripts/` touch code that the JavaScript and Flutter guides share, so they need an approval from the docs team. For reference, msonnb approved the last change to the component in #19729, and andreiborza approved the JavaScript interactive guide that added it in #19076. The checklist shows one step only on the MAUI guide. Every other step applies to every .NET guide, because .NET apps combine integrations, such as a Serilog sink in an ASP.NET Core app. I checked the guide against `7.0.0-rc.2` from nuget.org and against the `version7` branch at getsentry/sentry-dotnet@a56c63455. The guide describes 7.0.0. Where rc.2 still behaves differently, the release candidate note at the top says so. ### Why this goes live during the release candidate I'd like to merge this as soon as it's approved, while 7.0 is still in release candidate. 7.0.0 GA is planned for 2026-11-30. People who try the release candidate need the guide now, and the agent prompt needs a published `.md` URL to point at. Two develop-docs rules pull in different directions here. [Managing Linear projects](https://develop.sentry.dev/sdk/getting-started/playbooks/coordination/managing-linear-projects/#visibility-for-major-releases) says docs "MUST NOT go live before the SDK ships". The [breaking changes playbook](https://develop.sentry.dev/sdk/getting-started/playbooks/sdk-lifecycle/breaking-changes/#6-update-docs-and-changelog) says to publish the migration guide "before or alongside the major release". I read the first rule as protecting users from docs for code they can't get. Version `7.0.0-rc.2` is public on nuget.org, and the guide's first block says it's a release candidate and names that version. Other SDKs made the same call: - The Python 2.0 guide merged on 2024-02-28, while only the `2.0.0a1` alpha was out. Its note at the top said so. - The JavaScript v11 guide merged on 2026-09-08 with `11.0.0-beta.1` out, and its interactive version followed on 2026-09-11. - The Flutter v10 guide merged on 2026-10-05 with `10.0.0-rc.2` out, four days before 10.0.0. ### The release candidate note The guide opens with one `<Alert>`. It says there is no stable 7.0 yet, names `7.0.0-rc.2`, and says the rest of the .NET docs describe 6.x until 7.0.0 ships. It also covers what only the release candidate has: - `Logging.AddSentry()` after `ClearProviders()` doesn't add Sentry's logger providers back yet. That came with getsentry/sentry-dotnet#5776, after rc.2. - `DecompressionMethods` still includes Brotli, which getsentry/sentry-dotnet#5816 takes out of the default after rc.2. The note says how to leave it out until then. - An ASP.NET Core app that sends `ILogger` entries through NLog crashes with `Debug` on, tracked in getsentry/sentry-dotnet#5822. The guide's verify step turns `Debug` on, so the note says to leave it off in those apps. - Its `net11.0` builds depend on the .NET 11 release candidate versions of three `Microsoft.Extensions` packages. The rest of the guide describes 7.0.0 as released. At GA, I'll delete that one block from `includes/dotnet-v7-migration-overview.mdx`, and nothing else needs to change. ### What this PR leaves to other PRs This PR only adds the guide and what it needs. The reference pages are in other PRs, and this one doesn't need any of them to merge first: - Logs and the logging integrations: #19925 - `Microsoft.Extensions.Logging` and ASP.NET Core: #19961 - OpenTelemetry propagation: #19924 - Release and environment: #19960 - Hangfire monitor schedules: #19781 Three links in the guide point to the "Apps That Call UseSentry" sections that #19925 adds to the Serilog, NLog and log4net guides. Until #19925 merges, they open those guides at the top, and the migration guide sums up the same setups itself. There is no page for the new `Sentry.Extensions.Hosting` package yet. I'll link it from the guide once that page exists. Refs https://linear.app/getsentry/issue/NET-860 Refs getsentry/sentry-dotnet#5710 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the due date. You can update this information later by editing the PR description. - [x] Urgent deadline (GA date, etc.): 2026-11-30 - [ ] Other deadline: YYYY-MM-DD - [ ] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST _Make sure you've checked the following before merging your changes:_ - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: James Crosswell <jamescrosswell@users.noreply.github.com> Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
27 tasks done
1 of 6 tasks
ric-oliv
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 3, 2026
<!-- Keep the urgency section so automation can prioritize this PR. You may delete other sections you don't need. --> ## DESCRIBE YOUR PR Version `7.0.0-rc.3` of the Sentry SDK for .NET is out, so this PR updates the release candidate note at the top of the 7.x migration guide from #20143. The note listed three things that work differently on `7.0.0-rc.2`. All three fixes are in rc.3, so I removed the list: - `Logging.AddSentry()` after `ClearProviders()` adds Sentry's logger providers back, from getsentry/sentry-dotnet#5776. - `DecompressionMethods` leaves out Brotli by default, from getsentry/sentry-dotnet#5816. - An ASP.NET Core app that sends `ILogger` entries through NLog no longer crashes with `Debug` on, from getsentry/sentry-dotnet#5823. The note no longer names a release candidate. It points at the latest one on NuGet instead, so another release candidate before GA won't need a docs PR. I also fixed two gaps in the NU1605 paragraph: - `Sentry.AspNetCore.Blazor.WebAssembly` depends on the .NET 11 version of `Microsoft.AspNetCore.Components.WebAssembly`, so a Blazor WebAssembly app that pins 10.0.x fails to restore too. The paragraph now names that package. - An app that pins an older .NET 11 release candidate, such as `11.0.0-rc.2`, fails the same way as one that pins 10.0.x. The paragraph now says "an older version" and that the error message shows the version to use. I checked this against `7.0.0-rc.3` from nuget.org: - The default `DecompressionMethods` is `GZip, Deflate`. - A .NET 11 app fails to restore with NU1605 when it pins `Microsoft.Extensions.Http` 10.0.0 or 11.0.0-rc.2. - A Blazor WebAssembly app fails the same way when it pins `Microsoft.AspNetCore.Components.WebAssembly` 10.0.0. - All three fix PRs are in the `7.0.0-rc.3` tag. No other page in the guide names a release candidate version. The whole alert still comes out at 7.0.0 GA. Refs https://linear.app/getsentry/issue/NET-860 Refs getsentry/sentry-dotnet#5710 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the due date. You can update this information later by editing the PR description. - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ ## PRE-MERGE CHECKLIST _Make sure you've checked the following before merging your changes:_ - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
27 tasks done
This was referenced Nov 13, 2026
This was referenced Nov 14, 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
SentryOptions.DecompressionMethodsdefaulted to~DecompressionMethods.None, which is the same value asDecompressionMethods.All.DefaultSentryHttpClientFactorypasses it toHttpClientHandler.AutomaticDecompression, so every app using the SDK advertisedbrinAccept-Encodingand decoded Brotli responses from its DSN host, even thoughHttpClientleaves Brotli off by default.CVE-2026-111497 (a Brotli decoder memory-safety bug) lists that configuration as an exposed path. This changes the default to
GZip | Deflate.Closes #5813
Notes
!because it changes default behaviour in a major release. Responses from Sentry's ingest endpoints are small JSON bodies, so dropping Brotli should have no visible effect.options.DecompressionMethods |= DecompressionMethods.Brotli.🤖 Generated with Claude Code