Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PaginationRequest documents maxLimit as the server-enforced ceiling that getLimit() clamps a client-requested page size to, defaulting to 2000. The guard does not hold: the JSON-RPC receivers bind request parameters with Gson or Moshi, and both populate private fields by name, so the same request body the cap is supposed to constrain can also set the cap. A body of {"offset":0,"limit":999999,"maxLimit":999999} comes back with getLimit() returning 999999, which is the limit=999999 table-dump case the class javadoc and testEnterprise_maxLimitEnforced name as the reason the cap exists, and that value feeds straight into JPA setMaxResults. I noticed it while reading the clamp logic next to the wire-format docs, which list only offset and limit as client fields. Marking the field transient keeps it out of both binders while setMaxLimit() still works for service code, the only place the cap was meant to change. The new tests bind the hostile body through Gson and Moshi; both fail before the change and pass after.