You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merged PR 40874: Limit MaxItemCount in Virtualize (8.0)
# Limit MaxItemCount in Virtualize
Limits how much data Virtualize will load by default.
## Description
Ensures that `<Virtualize>` won't unexpectedly load or render a huge amount of data. Previously, a badly-behaved client could force it to load `int.MaxValue / ItemSize` items (if the underlying data store has that much data in it), where `ItemSize` is typically around 50.
Fixes MSRC case 88893
## Customer Impact
Addresses a reported issue whereby a badly-behaved client may report an arbitrarily-large viewport size, causing the server-side `Virtualize` component to perform a correspondingly large data load, and then to hold rendertree data in memory corresponding to this many items.
## Regression?
- [ ] Yes
- [x] No
[If yes, specify the version the behavior has regressed from]
## Risk
- [ ] High
- [ ] Medium
- [x] Low
By default the max items is set to 1000, which is way more than would normally be visible on any realistic screen. Typical per-item size is at least 20px, so unless someone's screen is > 20,000 pixels tall, they wouldn't exceed this new default maximum.
The logic is structured so that, if the client's viewport does not exceed this maximum, then no behavioral change should occur.
## Verification
- [x] Manual (required)
- [x] Automated
## Packaging changes reviewed?
- [ ] Yes
- [ ] No
- [x] N/A
---
Note to reviewers: this supersedes https://dev.azure.com/dnceng/internal/_git/dotnet-aspnetcore/pullrequest/40774 because it's from a different branch for 8.0.
0 commit comments