Skip to content
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

filter out invalid requirement strings from array #11049

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

brettfo
Copy link
Contributor

@brettfo brettfo commented Dec 3, 2024

When performing package update analysis, it's possible for invalid requirement strings to be passed in to the IgnoredVersions element. This can happen if the user manually added a version to the ignore list, but mistyped it.

The fix is to change the Requirement JSON converter to Requirement[] and filter out invalid values.

All changes to AnalyzeWorker.cs are to make unit testing easier so the Deserialize... method can be strongly-typed and directly called.

Issue found during a manual audit of error logs.

@brettfo brettfo requested a review from a team as a code owner December 3, 2024 19:59
@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Dec 3, 2024
@brettfo brettfo force-pushed the dev/brettfo/nuget-deserialize-dependency-info branch from 1186074 to c81f13f Compare December 3, 2024 20:52
@randhircs randhircs force-pushed the dev/brettfo/nuget-deserialize-dependency-info branch from c81f13f to 926785f Compare December 4, 2024 12:32
@randhircs randhircs merged commit e49ff5f into main Dec 4, 2024
70 checks passed
@randhircs randhircs deleted the dev/brettfo/nuget-deserialize-dependency-info branch December 4, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants