-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[Blazor] Fix type name hashing when the type has multibyte characters #52232
Conversation
I'll create a backport to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
/backport to release/8.0 |
Hi @MackinnonBuck. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
Started backporting to release/8.0: https://github.com/dotnet/aspnetcore/actions/runs/6963625517 |
…yte characters (#52316) Backport of #52232 to release/8.0 /cc @MackinnonBuck # [Blazor] Fix type name hashing when the type has multibyte characters Fixes an issue where an exception gets thrown if a render mode boundary component has a type whose full name contains multibyte characters. ## Description The bug results in an exception getting thrown if the type of a component with a render mode has a full name containing multibyte characters. It especially affects cases where a component (or the namespace it's defined in) contains non-Latin characters. This PR fixes the issue by allocating a constant-sized stack buffer and falling back to a heap-allocated buffer when the type name is too long. Fixes #50879 Fixes #52109 ## Customer Impact Blazor Apps with non-Latin code might not be able to use interactivity. The workaround is to ensure that the full name of any component serving as a render mode boundary does not contain multibyte characters. ## Regression? - [ ] Yes - [X] No Render modes are a new feature in .NET 8, so this bug is not a regression. ## Risk - [ ] High - [ ] Medium - [X] Low The fix is straightforward and we have new automated tests for this scenario. ## Verification - [X] Manual (required) - [X] Automated ## Packaging changes reviewed? - [ ] Yes - [ ] No - [X] N/A --------- Co-authored-by: Mackinnon Buck <[email protected]>
Fix type name hashing when the type has multibyte characters
Fixes an issue where an exception gets thrown if a render mode boundary component has a type whose full name contains multibyte characters.
Description
This PR fixes the issue by allocating a constant-sized stack buffer and falling back to a heap-allocated buffer when the type name is too long.
Fixes #50879
Fixes #52109