-
Notifications
You must be signed in to change notification settings - Fork 6k
[Breaking change]: Promote HTTP Warnings to Errors in dotnet package list and dotnet package search #46074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[Breaking change]: Promote HTTP Warnings to Errors in dotnet package list and dotnet package search #46074
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c40bbe3
[Breaking change]: Promote HTTP Warnings to Errors in dotnet package …
CamSoper c7f1075
Fix formatting in HTTP warnings documentation for affected APIs section
CamSoper 9df3ccb
Update docs/core/compatibility/sdk/10.0/http-warnings-to-errors.md
CamSoper 80657f8
Update docs/core/compatibility/10.0.md
CamSoper 55f4d69
Update docs/core/compatibility/toc.yml
CamSoper d045b5b
Added source compatibility
CamSoper c933715
Fix formatting in note section of HTTP warnings documentation
CamSoper d6803ff
Revert to just behavioral change
CamSoper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
52 changes: 52 additions & 0 deletions
52
docs/core/compatibility/sdk/10.0/http-warnings-to-errors.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: "Breaking change - HTTP warnings promoted to errors in dotnet package list and dotnet package search" | ||
description: "Learn about the breaking change in .NET 10 Preview 4 where HTTP warnings are promoted to errors in dotnet package operations." | ||
ms.date: 5/9/2025 | ||
ai-usage: ai-assisted | ||
ms.custom: https://github.com/dotnet/docs/issues/45985 | ||
--- | ||
|
||
# HTTP warnings promoted to errors in `dotnet package list` and `dotnet package search` | ||
|
||
Starting in .NET 10 Preview 4, HTTP warnings generated by `dotnet package list`, `dotnet package search`, and related APIs are now treated as errors by default. | ||
|
||
## Version introduced | ||
|
||
.NET 10 Preview 4 | ||
|
||
## Previous behavior | ||
|
||
Previously, when using HTTP sources, the tools displayed a warning, such as: | ||
|
||
```output | ||
You are running the 'list package' operation with an 'HTTP' source, 'http://api.source/index.json'. Non-HTTPS access will be removed in a future version. Consider migrating to an 'HTTPS' source. | ||
``` | ||
|
||
The operation continued without interruption. | ||
|
||
## New behavior | ||
|
||
The tools now treat HTTP sources as errors by default. To allow HTTP sources, explicitly set `allowInsecureConnections="true"` in *nuget.config*. | ||
|
||
## Type of breaking change | ||
|
||
This is a [behavioral change](../../categories.md#behavioral-change). | ||
CamSoper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Reason for change | ||
|
||
This change improves security by blocking insecure HTTP sources by default. It aligns with secure-by-default practices to protect users from potential vulnerabilities. | ||
|
||
## Recommended action | ||
|
||
Migrate to HTTPS sources to avoid the error. To continue using HTTP sources, update your *nuget.config* file to include the following setting: | ||
|
||
```xml | ||
<add key="allowInsecureConnections" value="true" /> | ||
``` | ||
|
||
## Affected APIs | ||
|
||
- `dotnet package list` | ||
- `dotnet package search` | ||
- `NuGet.Protocol.Core.Types.PackageUpdateResource.PushAsync` | ||
- `NuGet.Protocol.Core.Types.PackageUpdateResource.Delete` |
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
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.
Uh oh!
There was an error while loading. Please reload this page.