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

WordPress Trac noreply at wordpress.org
Fri Aug 14 16:53:02 UTC 2015


#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:  Awaiting Review
Component:  Query         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by knutsp):

 * version:  trunk =>


Comment:

 I don't like the many uses of `absint()` in core. If the goal is to
 sanitize a value that should be a positive integer then all non-postive
 integer values, after casting to integer, should either return an error or
 false (bail), or nothing (not found). This may be done by sanitizing
 negative integers 0 and continue.

 1234 is not a sane value for -1234. -1234 is just illegal, can not and
 should not, be sanitized into something legal.

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


More information about the wp-trac mailing list