-
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
Server-side Blazor should use WebSocket compression #30745
Comments
Thanks for contacting us. |
The RFC acknowledges the usual compression concern,
So, if you do it, it should be off by default IMO, much like http compression when TLS is on. @GrabYourPitchforks any thoughts here? |
Thanks @blowdart. |
It's also worth noting that Blazor Server already deduplicates strings if we know for sure that they came from compile-time constants, and hence don't vary by user input. So it's already a kind of compression for the things we know are safe. |
Using https://themesof.net/ as an example server-side Blazor app; its still very chonky 94.2 kB is the reload of server-side render (as it resends the starting state vs WebSocket); which is 7 kB when compressed 482 kB is clicking the open nodes button; which is super chonk |
I'd personally be open to enabling an option for this if it became a common customer request. In this specific example with themesof.net, I don't think the compression oracle attacks would be a viable attack vector, since there's very limited scope for an attacker inserting their own data into the stream. Though maybe the attacker could be someone with write access to issue titles/labels. Generally the problem with having these kinds of options is that developers may turn them on because they understand the benefits but don't understand the risks. The risk level of compression oracle attacks is really hard to estimate or communicate. |
Dependent on dotnet/runtime#49304
The text was updated successfully, but these errors were encountered: