[wp-trac] [WordPress Trac] #5272: WordPress allows anonymous user to see slug for private post by guessing post number

WordPress Trac noreply at wordpress.org
Sat Aug 15 13:14:03 UTC 2020


#5272: WordPress allows anonymous user to see slug for private post by guessing
post number
-------------------------------------------------+-------------------------
 Reporter:  tzafrir                              |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  5.6
Component:  Security                             |     Version:  2.3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-unit-    |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by TimothyBlynJacobs):

 Replying to [comment:17 peterwilsoncc]:
 > @TimothyBlynJacobs I've included a check for `get_post_status_object(
 $redirect_obj->post_status )->public`, do you think I should logic check
 for `private` or `internal` too?

 I really don't know. I don't think it's valid for more than one of
 `public`, `protected` or `private` to be set to `true`. But since the
 function doesn't enforce that perhaps some developers have accidentally
 done that?

 I guess the `publicly_queryable` post status arg might also be the thing
 to check? At a first glance, I can't find it being used anywhere in Core
 though.

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


More information about the wp-trac mailing list