[wp-trac] [WordPress Trac] #33372: WP_Query may return incorrect results when using negative values with parameter p.

WordPress Trac noreply at wordpress.org
Tue May 24 19:19:44 UTC 2016


#33372: WP_Query may return incorrect results when using negative values with
parameter p.
-------------------------------------------------+-------------------------
 Reporter:  giantrobot                           |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Query                                |  Release
 Severity:  normal                               |     Version:
 Keywords:  needs-patch needs-unit-tests good-   |  Resolution:
  first-bug                                      |     Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):

 * keywords:  reporter-feedback dev-feedback => needs-patch needs-unit-tests
     good-first-bug
 * milestone:  Awaiting Review => Future Release


Comment:

 @giantrobot Thanks for the report, and welcome to WordPress Trac!

 After some discussion during a recent bug scrub, we came to the following
 conclusions:

 - The current behavior is, indeed, bad.
 - The most sensible behavior is to 404.
 - This can probably be done by swapping `absint()` with `intval()`.

 The larger problem of `absint()` (ab)use through core should be handled on
 a case-by-case basis.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33372#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list