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

remove Microsoft.AspNetCore.Localization dependency #4774

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

sbwalker
Copy link
Member

No description provided.

@sbwalker sbwalker merged commit 8668165 into oqtane:dev Oct 24, 2024
@sbwalker
Copy link
Member Author

note this PR adds Microsoft.AspNetCore.Http which will need to be removed in a subsequent PR

@hishamco
Copy link
Contributor

Is there a reason to remove it?

@sbwalker
Copy link
Member Author

sbwalker commented Oct 24, 2024

@hishamco Microsoft.AspNetCore.Localization version 2.2.0 has been flagged as deprecated for quite some time (dotnet/announcements#217). In .NET 9 it is now flagged as containing a critical severity vulnerability:

warning NU1904: Package 'System.Text.Encodings.Web' 4.5.0 has a known critical severity vulnerability, https://github.com/advisories/GHSA-ghhp-997w-qr28

System.Text.Encodings.Web is part of Microsoft.AspNetCore.Localization

@sbwalker
Copy link
Member Author

sbwalker commented Oct 24, 2024

@hishamco Microsoft.AspNetCore.Http also contains System.Text.Encodings.Web as well so it has a similar problem in the upgrade to .NET 9. You can read more about it here: dotnet/aspnetcore#58593

@hishamco
Copy link
Contributor

Yes, I remembered that above announcement, but still a part of AspNetCore https://github.com/dotnet/aspnetcore/tree/main/src/Middleware/Localization/src I'm not sure why you are trying to implement RequestCulture and CookieRequestCultureProvider yourself?!!

@sbwalker
Copy link
Member Author

sbwalker commented Oct 24, 2024

@hishamco please read: dotnet/aspnetcore#58593 - it is not possible to access Microsoft.AspNetCore.App from within a Blazor Client project (ie. <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">). CookieRequestCultureProvider is only available in Microsoft.AspNetCore.App so there is no way to access it in a Blazor Client project. This is a major headache in upgrading to .NET 9.

@hishamco
Copy link
Contributor

Maybe I didn't dig into the latest link, so can we add Oqtane.Localization project or namespace for that to make things much cleaner and organized

This is a major headache in upgrading to .NET 9.

Good to know that

@sbwalker
Copy link
Member Author

"can we add Oqtane.Localization project or namespace" I would prefer not to at this time as I am still exploring various solutions to try to avoid copying these classes into Oqtane

@hishamco
Copy link
Contributor

Do you want me to try something?

@sbwalker sbwalker changed the title remove Microsoft.AspNetCore.Localization remove Microsoft.AspNetCore.Localization dependency Oct 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants