[wp-trac] [WordPress Trac] #39061: REST API pagination: Large INT passed to `paged` query arg doesn't fail properly
WordPress Trac
noreply at wordpress.org
Sun Apr 23 06:58:09 UTC 2017
#39061: REST API pagination: Large INT passed to `paged` query arg doesn't fail
properly
------------------------------------------+-----------------------
Reporter: morganestes | Owner: joehoyle
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.8
Component: REST API | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------
Comment (by joehoyle):
Attached a patch for comments endpoint with the same functionality:
1. Handle `page` query var that is bigger than PHP_MAX_INT.
2. Show an out of bounds error if the `page` is larger than `X-TotalPages`
Like `/wp/v2/posts` we also no longer return pagination headers in the
case of the out of bounds error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39061#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list