Skip to content

Cap the rows a panel grid may ask for at 1000 - #1112

Merged
KrzysztofPajak merged 1 commit into
developfrom
fix/grid-page-size-limit
Nov 23, 2026
Merged

KrzysztofPajak merged 1 commit into
developfrom
fix/grid-page-size-limit

Conversation

@KrzysztofPajak

Copy link
Copy Markdown
Member

The panel grids post their page and page size, and DataSourceRequest took both as sent. Most list actions pass PageSize straight to the query, so a signed-in staff member of the Admin, Store or Vendor panel could post pageSize=2147483647 and read a whole collection (payment transactions, recurring payments, customers…) in one response, or tie up the server building it.

Changes

  • DataSourceRequest.PageSize is kept between 1 and MaxPageSize (1000); Page is at least 1.

Notes

  • The page size choices of the grids come from the GridPageSizes setting (10–100 by default), so a configured choice up to 1000 rows keeps working.
  • The storefront lists use their own paging command and are not affected.
  • Tests that posted page 0 to the "add product" popups now post page 1; the page is 1-based there (PrepareProductList subtracts one).

Tests

  • DataSourceRequestTests (new): a size above the limit is cut to 1000, a size within it is kept, page and size below one become one.
  • Grand.Web.Common.Tests (777), Grand.Web.Admin.Tests (2109), Grand.Web.Store.Tests (245), Grand.Web.Vendor.Tests (53) pass.

Copilot AI balanced review requested due to automatic review settings November 23, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@KrzysztofPajak
KrzysztofPajak merged commit 26616d6 into develop Nov 23, 2026
9 checks passed
@KrzysztofPajak
KrzysztofPajak deleted the fix/grid-page-size-limit branch November 25, 2026 09:09
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