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

Microsoft.AspNetCore.StaticFiles 2.2.0 is deprecated and will lead to a lot of critical security vulnerability warnings (NU1904) #1088

Closed
gszdev opened this issue Nov 13, 2024 · 1 comment
Assignees

Comments

@gszdev
Copy link

gszdev commented Nov 13, 2024

Is is possible to remove the dependency to the depracted nuget package 'Microsoft.AspNetCore.StaticFiles' (AspNetCore 2.2, ...)?
And I assume that a FrameworkReference to Microsoft.AspNetCore.App is not wanted for sure.

A least with .NET 9 it will lead to critical security vulnerability warnings (NU1904)

A simple copy of FileExtensionContentTypeProvider.cs should be enough to repace the usage in ObjectTeams.cs new FileExtensionContentTypeProvider().TryGetContentType(photoPath, out contentType);
Or use the MimTypeMap like from PnP.Core PnP.Core/Utilities/MimeTypeMap.cs

But I don't know wether the licensing allows it.

FileExtensionContentTypeProvider.cs
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

Is PnP.Framework part auf the .NET Foundation?

@gszdev gszdev changed the title Microsoft.AspNetCore.StaticFiles 2.2.0 is deprecated a leads to a lot of critical security vulnerability warnings (NU1904) Microsoft.AspNetCore.StaticFiles 2.2.0 is deprecated and will lead to a lot of critical security vulnerability warnings (NU1904) Nov 13, 2024
@jansenbe jansenbe self-assigned this Nov 20, 2024
@jansenbe
Copy link
Contributor

@gszdev : I've removed this dependency (copied over the one class we needed from this old deprecated assembly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants