[wp-trac] [WordPress Trac] #17361: get_page_by_path() returns deleted posts

WordPress Trac wp-trac at lists.automattic.com
Tue May 10 05:50:27 UTC 2011


#17361: get_page_by_path() returns deleted posts
--------------------------+------------------------------
 Reporter:  mark8barnes   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.1.2
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+------------------------------
Changes (by nacin):

 * keywords:   => close


Comment:

 get_page_by_path() does no checks on post status. That means it also
 returns drafts, pending posts, future posts, and the like. You need to
 validate the post_status coming from the return value.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17361#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list